home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / GameCreators / TADS / manuals / TEX / TADSADV.TEX < prev    next >
LaTeX Document  |  1994-09-13  |  76.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: TADSADV.TEX

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document, ASCII text, with CRLF line terminators default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried x-fmt/111 Plain Text File default
100% detectItEasy Format: plain text[CRLF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 24 48 65 61 64 65 | 72 3a 20 63 3a 2f 74 61 |% $Heade|r: c:/ta|
|00000010| 64 73 2f 64 6f 63 2f 52 | 43 53 2f 74 61 64 73 61 |ds/doc/R|CS/tadsa|
|00000020| 64 76 2e 74 65 78 20 31 | 2e 32 20 39 32 2f 31 31 |dv.tex 1|.2 92/11|
|00000030| 2f 31 33 20 31 36 3a 34 | 35 3a 30 38 20 6d 72 6f |/13 16:4|5:08 mro|
|00000040| 62 65 72 74 73 20 45 78 | 70 20 24 0d 0a 25 0d 0a |berts Ex|p $..%..|
|00000050| 25 20 54 41 44 53 20 44 | 6f 63 75 6d 65 6e 74 61 |% TADS D|ocumenta|
|00000060| 74 69 6f 6e 2c 20 43 68 | 61 70 74 65 72 20 46 6f |tion, Ch|apter Fo|
|00000070| 75 72 3a 20 20 57 72 69 | 74 69 6e 67 20 41 64 76 |ur: Wri|ting Adv|
|00000080| 65 6e 74 75 72 65 73 0d | 0a 25 0d 0a 25 20 43 6f |entures.|.%..% Co|
|00000090| 70 79 72 69 67 68 74 20 | 28 63 29 20 31 39 38 39 |pyright |(c) 1989|
|000000a0| 20 62 79 20 4d 69 63 68 | 61 65 6c 20 4a 2e 20 52 | by Mich|ael J. R|
|000000b0| 6f 62 65 72 74 73 2e 20 | 20 41 6c 6c 20 52 69 67 |oberts. | All Rig|
|000000c0| 68 74 73 20 52 65 73 65 | 72 76 65 64 2e 0d 0a 0d |hts Rese|rved....|
|000000d0| 0a 5c 63 68 61 70 74 65 | 72 68 65 61 64 65 72 7b |.\chapte|rheader{|
|000000e0| 43 68 61 70 74 65 72 20 | 46 6f 75 72 7d 7b 57 72 |Chapter |Four}{Wr|
|000000f0| 69 74 69 6e 67 20 41 64 | 76 65 6e 74 75 72 65 73 |iting Ad|ventures|
|00000100| 7d 7b 34 7d 0d 0a 0d 0a | 54 68 65 20 70 72 65 76 |}{4}....|The prev|
|00000110| 69 6f 75 73 20 63 68 61 | 70 74 65 72 20 64 65 73 |ious cha|pter des|
|00000120| 63 72 69 62 65 64 20 54 | 41 44 53 20 61 73 20 61 |cribed T|ADS as a|
|00000130| 20 67 65 6e 65 72 61 6c | 2d 70 75 72 70 6f 73 65 | general|-purpose|
|00000140| 20 6f 62 6a 65 63 74 2d | 6f 72 69 65 6e 74 65 64 | object-|oriented|
|00000150| 0d 0a 70 72 6f 67 72 61 | 6d 6d 69 6e 67 20 6c 61 |..progra|mming la|
|00000160| 6e 67 75 61 67 65 2c 20 | 77 69 74 68 20 6f 6e 6c |nguage, |with onl|
|00000170| 79 20 61 20 66 65 77 20 | 72 65 66 65 72 65 6e 63 |y a few |referenc|
|00000180| 65 73 20 74 6f 20 69 74 | 73 20 61 70 70 6c 69 63 |es to it|s applic|
|00000190| 61 74 69 6f 6e 20 61 73 | 20 61 0d 0a 74 65 78 74 |ation as| a..text|
|000001a0| 20 61 64 76 65 6e 74 75 | 72 65 20 73 79 73 74 65 | adventu|re syste|
|000001b0| 6d 2e 20 20 54 68 69 73 | 20 63 68 61 70 74 65 72 |m. This| chapter|
|000001c0| 20 69 6e 74 72 6f 64 75 | 63 65 73 20 74 68 65 20 | introdu|ces the |
|000001d0| 60 60 5e 7b 70 6c 61 79 | 65 72 20 63 6f 6d 6d 61 |``^{play|er comma|
|000001e0| 6e 64 0d 0a 70 61 72 73 | 65 72 7d 2c 22 20 77 68 |nd..pars|er}," wh|
|000001f0| 69 63 68 20 69 73 20 74 | 68 65 20 63 6f 72 65 20 |ich is t|he core |
|00000200| 6f 66 20 74 68 65 20 75 | 73 65 72 20 69 6e 74 65 |of the u|ser inte|
|00000210| 72 66 61 63 65 20 74 6f | 20 79 6f 75 72 20 54 41 |rface to| your TA|
|00000220| 44 53 20 67 61 6d 65 2e | 0d 0a 0d 0a 54 68 65 20 |DS game.|....The |
|00000230| 70 6c 61 79 65 72 20 63 | 6f 6d 6d 61 6e 64 20 70 |player c|ommand p|
|00000240| 61 72 73 65 72 20 72 65 | 61 64 73 20 63 6f 6d 6d |arser re|ads comm|
|00000250| 61 6e 64 73 20 66 72 6f | 6d 20 74 68 65 20 70 6c |ands fro|m the pl|
|00000260| 61 79 65 72 2c 20 72 65 | 73 6f 6c 76 65 73 20 74 |ayer, re|solves t|
|00000270| 68 6f 73 65 0d 0a 63 6f | 6d 6d 61 6e 64 73 20 69 |hose..co|mmands i|
|00000280| 6e 74 6f 20 6f 62 6a 65 | 63 74 73 20 69 6e 20 79 |nto obje|cts in y|
|00000290| 6f 75 72 20 67 61 6d 65 | 20 70 72 6f 67 72 61 6d |our game| program|
|000002a0| 2c 20 61 6e 64 20 69 6e | 76 6f 6b 65 73 20 6d 65 |, and in|vokes me|
|000002b0| 74 68 6f 64 73 20 69 6e | 20 74 68 6f 73 65 0d 0a |thods in| those..|
|000002c0| 6f 62 6a 65 63 74 73 20 | 61 63 63 6f 72 64 69 6e |objects |accordin|
|000002d0| 67 20 74 6f 20 74 68 6f | 73 65 20 63 6f 6d 6d 61 |g to tho|se comma|
|000002e0| 6e 64 73 2e 20 20 54 68 | 65 20 54 41 44 53 20 70 |nds. Th|e TADS p|
|000002f0| 61 72 73 65 72 20 69 73 | 20 68 69 67 68 6c 79 0d |arser is| highly.|
|00000300| 0a 73 6f 70 68 69 73 74 | 69 63 61 74 65 64 3b 20 |.sophist|icated; |
|00000310| 69 74 20 70 72 6f 76 69 | 64 65 73 20 61 64 76 61 |it provi|des adva|
|00000320| 6e 63 65 64 20 66 65 61 | 74 75 72 65 73 20 74 6f |nced fea|tures to|
|00000330| 20 74 68 65 20 70 6c 61 | 79 65 72 20 77 68 69 6c | the pla|yer whil|
|00000340| 65 20 72 65 6c 69 65 76 | 69 6e 67 0d 0a 79 6f 75 |e reliev|ing..you|
|00000350| 72 20 67 61 6d 65 20 6f | 66 20 74 68 65 20 6e 65 |r game o|f the ne|
|00000360| 65 64 20 74 6f 20 69 6d | 70 6c 65 6d 65 6e 74 20 |ed to im|plement |
|00000370| 74 68 6f 73 65 20 66 65 | 61 74 75 72 65 73 2e 20 |those fe|atures. |
|00000380| 20 54 6f 20 70 72 6f 76 | 69 64 65 20 79 6f 75 20 | To prov|ide you |
|00000390| 77 69 74 68 20 61 0d 0a | 77 61 79 20 74 6f 20 63 |with a..|way to c|
|000003a0| 75 73 74 6f 6d 69 7a 65 | 20 6d 61 6e 79 20 6f 66 |ustomize| many of|
|000003b0| 20 74 68 65 20 70 61 72 | 73 65 72 27 73 20 66 75 | the par|ser's fu|
|000003c0| 6e 63 74 69 6f 6e 73 2c | 20 74 68 6f 75 67 68 2c |nctions,| though,|
|000003d0| 20 74 68 65 20 73 79 73 | 74 65 6d 20 72 65 71 75 | the sys|tem requ|
|000003e0| 69 72 65 73 0d 0a 74 68 | 61 74 20 79 6f 75 20 64 |ires..th|at you d|
|000003f0| 65 66 69 6e 65 20 63 65 | 72 74 61 69 6e 20 66 75 |efine ce|rtain fu|
|00000400| 6e 63 74 69 6f 6e 73 20 | 61 6e 64 20 6f 62 6a 65 |nctions |and obje|
|00000410| 63 74 73 2e 0d 0a 0d 0a | 54 68 69 73 20 63 68 61 |cts.....|This cha|
|00000420| 70 74 65 72 20 64 65 73 | 63 72 69 62 65 73 20 74 |pter des|cribes t|
|00000430| 68 65 20 66 65 61 74 75 | 72 65 73 20 6f 66 20 74 |he featu|res of t|
|00000440| 68 65 20 70 61 72 73 65 | 72 2c 20 68 6f 77 20 69 |he parse|r, how i|
|00000450| 74 20 77 6f 72 6b 73 2c | 20 61 6e 64 20 68 6f 77 |t works,| and how|
|00000460| 0d 0a 69 74 20 69 6e 74 | 65 72 61 63 74 73 20 77 |..it int|eracts w|
|00000470| 69 74 68 20 79 6f 75 72 | 20 67 61 6d 65 20 70 72 |ith your| game pr|
|00000480| 6f 67 72 61 6d 2e 20 20 | 54 68 65 20 73 70 65 63 |ogram. |The spec|
|00000490| 69 61 6c 20 66 75 6e 63 | 74 69 6f 6e 73 20 61 6e |ial func|tions an|
|000004a0| 64 20 6f 62 6a 65 63 74 | 73 20 74 68 61 74 0d 0a |d object|s that..|
|000004b0| 79 6f 75 72 20 67 61 6d | 65 20 6d 75 73 74 20 64 |your gam|e must d|
|000004c0| 65 66 69 6e 65 20 61 72 | 65 20 61 6c 73 6f 20 65 |efine ar|e also e|
|000004d0| 78 70 6c 61 69 6e 65 64 | 2e 20 20 49 6e 20 73 68 |xplained|. In sh|
|000004e0| 6f 72 74 2c 20 74 68 69 | 73 20 63 68 61 70 74 65 |ort, thi|s chapte|
|000004f0| 72 20 64 65 73 63 72 69 | 62 65 73 0d 0a 74 68 65 |r descri|bes..the|
|00000500| 20 63 6f 6d 70 6c 65 74 | 65 20 72 75 6e 2d 74 69 | complet|e run-ti|
|00000510| 6d 65 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 6f |me envir|onment o|
|00000520| 66 20 79 6f 75 72 20 67 | 61 6d 65 20 70 72 6f 67 |f your g|ame prog|
|00000530| 72 61 6d 2e 5c 62 75 6c | 6c 0d 0a 0d 0a 5c 63 68 |ram.\bul|l....\ch|
|00000540| 61 70 74 65 72 62 6f 64 | 79 0d 0a 0d 0a 5c 6d 61 |apterbod|y....\ma|
|00000550| 6a 6f 72 73 65 63 74 69 | 6f 6e 7b 54 68 65 20 60 |jorsecti|on{The `|
|00000560| 60 70 72 65 70 61 72 73 | 65 27 27 20 46 75 6e 63 |`prepars|e'' Func|
|00000570| 74 69 6f 6e 7d 0d 0a 0d | 0a 45 61 63 68 20 74 69 |tion}...|.Each ti|
|00000580| 6d 65 20 74 68 65 20 70 | 6c 61 79 65 72 20 65 6e |me the p|layer en|
|00000590| 74 65 72 73 20 61 20 63 | 6f 6d 70 6c 65 74 65 20 |ters a c|omplete |
|000005a0| 6c 69 6e 65 20 6f 66 20 | 74 65 78 74 2c 20 61 6e |line of |text, an|
|000005b0| 64 20 62 65 66 6f 72 65 | 20 74 68 65 0d 0a 54 41 |d before| the..TA|
|000005c0| 44 53 20 70 6c 61 79 65 | 72 20 63 6f 6d 6d 61 6e |DS playe|r comman|
|000005d0| 64 20 70 61 72 73 65 72 | 20 73 74 61 72 74 73 20 |d parser| starts |
|000005e0| 6c 6f 6f 6b 69 6e 67 20 | 61 74 20 74 68 65 20 6c |looking |at the l|
|000005f0| 69 6e 65 20 6f 66 20 74 | 65 78 74 2c 20 61 0d 0a |ine of t|ext, a..|
|00000600| 73 70 65 63 69 61 6c 20 | 75 73 65 72 2d 64 65 66 |special |user-def|
|00000610| 69 6e 65 64 20 66 75 6e | 63 74 69 6f 6e 20 63 61 |ined fun|ction ca|
|00000620| 6c 6c 65 64 20 7b 5c 74 | 74 20 70 72 65 70 61 72 |lled {\t|t prepar|
|00000630| 73 65 7d 20 69 73 20 65 | 78 65 63 75 74 65 64 2e |se} is e|xecuted.|
|00000640| 0d 0a 5e 5e 7b 70 72 65 | 70 61 72 73 65 7d 0d 0a |..^^{pre|parse}..|
|00000650| 0d 0a 54 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 74 |..The fu|nction t|
|00000660| 61 6b 65 73 20 61 20 73 | 69 6e 67 6c 65 20 61 72 |akes a s|ingle ar|
|00000670| 67 75 6d 65 6e 74 2c 20 | 77 68 69 63 68 20 69 73 |gument, |which is|
|00000680| 20 61 20 73 74 72 69 6e | 67 20 63 6f 6e 74 61 69 | a strin|g contai|
|00000690| 6e 69 6e 67 0d 0a 74 68 | 65 20 74 65 78 74 20 74 |ning..th|e text t|
|000006a0| 68 61 74 20 74 68 65 20 | 70 6c 61 79 65 72 20 74 |hat the |player t|
|000006b0| 79 70 65 64 20 6f 6e 20 | 74 68 65 20 63 6f 6d 6d |yped on |the comm|
|000006c0| 61 6e 64 20 6c 69 6e 65 | 2e 20 20 54 68 65 20 63 |and line|. The c|
|000006d0| 6f 6d 70 6c 65 74 65 0d | 0a 74 65 78 74 20 69 73 |omplete.|.text is|
|000006e0| 20 70 72 6f 76 69 64 65 | 64 2c 20 75 6e 63 68 61 | provide|d, uncha|
|000006f0| 6e 67 65 64 2c 20 70 72 | 65 73 65 72 76 69 6e 67 |nged, pr|eserving|
|00000700| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 73 70 | the ori|ginal sp|
|00000710| 61 63 65 73 2c 0d 0a 70 | 75 6e 63 74 75 61 74 69 |aces,..p|unctuati|
|00000720| 6f 6e 2c 20 61 6e 64 20 | 63 61 70 69 74 61 6c 69 |on, and |capitali|
|00000730| 7a 61 74 69 6f 6e 2e 20 | 20 54 68 65 20 61 63 74 |zation. | The act|
|00000740| 6f 72 2c 20 76 65 72 62 | 2c 20 61 6e 64 20 6f 74 |or, verb|, and ot|
|00000750| 68 65 72 20 6f 62 6a 65 | 63 74 73 0d 0a 61 72 65 |her obje|cts..are|
|00000760| 20 73 74 69 6c 6c 20 75 | 6e 6b 6e 6f 77 6e 20 77 | still u|nknown w|
|00000770| 68 65 6e 20 7b 5c 74 74 | 20 70 72 65 70 61 72 73 |hen {\tt| prepars|
|00000780| 65 28 29 7d 20 69 73 20 | 63 61 6c 6c 65 64 2c 20 |e()} is |called, |
|00000790| 73 69 6e 63 65 20 74 68 | 65 20 70 61 72 73 65 72 |since th|e parser|
|000007a0| 0d 0a 68 61 73 6e 27 74 | 20 73 65 65 6e 20 74 68 |..hasn't| seen th|
|000007b0| 65 20 73 74 72 69 6e 67 | 20 79 65 74 2e 0d 0a 0d |e string| yet....|
|000007c0| 0a 59 6f 75 72 20 7b 5c | 74 74 20 70 72 65 70 61 |.Your {\|tt prepa|
|000007d0| 72 73 65 7d 20 66 75 6e | 63 74 69 6f 6e 20 63 61 |rse} fun|ction ca|
|000007e0| 6e 20 63 68 61 6e 67 65 | 20 74 68 65 20 63 6f 6d |n change| the com|
|000007f0| 6d 61 6e 64 20 73 74 72 | 69 6e 67 20 74 6f 20 61 |mand str|ing to a|
|00000800| 6e 79 0d 0a 6e 65 77 20 | 73 74 72 69 6e 67 20 69 |ny..new |string i|
|00000810| 74 20 64 65 73 69 72 65 | 73 2c 20 6f 72 20 69 74 |t desire|s, or it|
|00000820| 20 63 61 6e 20 61 62 6f | 72 74 20 74 68 65 20 63 | can abo|rt the c|
|00000830| 6f 6d 6d 61 6e 64 20 61 | 6c 74 6f 67 65 74 68 65 |ommand a|ltogethe|
|00000840| 72 2c 20 6f 72 0d 0a 69 | 74 20 63 61 6e 20 63 68 |r, or..i|t can ch|
|00000850| 6f 6f 73 65 20 74 6f 20 | 64 6f 20 6e 6f 74 68 69 |oose to |do nothi|
|00000860| 6e 67 20 61 6e 64 20 6c | 65 74 20 74 68 65 20 6f |ng and l|et the o|
|00000870| 72 69 67 69 6e 61 6c 20 | 70 6c 61 79 65 72 27 73 |riginal |player's|
|00000880| 20 63 6f 6d 6d 61 6e 64 | 0d 0a 62 65 20 70 72 6f | command|..be pro|
|00000890| 63 65 73 73 65 64 20 61 | 73 20 6e 6f 72 6d 61 6c |cessed a|s normal|
|000008a0| 2e 0d 0a 0d 0a 49 66 20 | 7b 5c 74 74 20 70 72 65 |.....If |{\tt pre|
|000008b0| 70 61 72 73 65 28 29 7d | 20 72 65 74 75 72 6e 73 |parse()}| returns|
|000008c0| 20 61 20 73 74 72 69 6e | 67 20 76 61 6c 75 65 2c | a strin|g value,|
|000008d0| 20 74 68 65 20 6e 65 77 | 20 73 74 72 69 6e 67 20 | the new| string |
|000008e0| 72 65 70 6c 61 63 65 73 | 0d 0a 74 68 65 20 6f 72 |replaces|..the or|
|000008f0| 69 67 69 6e 61 6c 20 63 | 6f 6d 6d 61 6e 64 20 74 |iginal c|ommand t|
|00000900| 68 61 74 20 74 68 65 20 | 70 6c 61 79 65 72 20 74 |hat the |player t|
|00000910| 79 70 65 64 2e 20 20 54 | 68 65 20 70 61 72 73 65 |yped. T|he parse|
|00000920| 72 20 70 72 6f 63 65 73 | 73 65 73 0d 0a 74 68 65 |r proces|ses..the|
|00000930| 20 6e 65 77 20 73 74 72 | 69 6e 67 20 61 73 20 74 | new str|ing as t|
|00000940| 68 6f 75 67 68 20 74 68 | 65 20 70 6c 61 79 65 72 |hough th|e player|
|00000950| 20 68 61 64 20 74 79 70 | 65 64 20 69 74 2e 0d 0a | had typ|ed it...|
|00000960| 0d 0a 49 66 20 74 68 65 | 20 66 75 6e 63 74 69 6f |..If the| functio|
|00000970| 6e 20 72 65 74 75 72 6e | 73 20 7b 5c 74 74 20 6e |n return|s {\tt n|
|00000980| 69 6c 7d 2c 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |il}, the| command|
|00000990| 20 69 73 20 61 62 6f 72 | 74 65 64 20 61 6c 74 6f | is abor|ted alto|
|000009a0| 67 65 74 68 65 72 2c 0d | 0a 61 6e 64 20 74 68 65 |gether,.|.and the|
|000009b0| 20 70 6c 61 79 65 72 20 | 69 73 20 69 6d 6d 65 64 | player |is immed|
|000009c0| 69 61 74 65 6c 79 20 70 | 72 6f 6d 70 74 65 64 20 |iately p|rompted |
|000009d0| 66 6f 72 20 61 20 6e 65 | 77 20 63 6f 6d 6d 61 6e |for a ne|w comman|
|000009e0| 64 2e 0d 0a 0d 0a 49 66 | 20 74 68 65 20 66 75 6e |d.....If| the fun|
|000009f0| 63 74 69 6f 6e 20 72 65 | 74 75 72 6e 73 20 7b 5c |ction re|turns {\|
|00000a00| 74 74 20 74 72 75 65 7d | 2c 20 74 68 65 20 6f 72 |tt true}|, the or|
|00000a10| 69 67 69 6e 61 6c 20 73 | 74 72 69 6e 67 20 74 79 |iginal s|tring ty|
|00000a20| 70 65 64 20 62 79 0d 0a | 74 68 65 20 70 6c 61 79 |ped by..|the play|
|00000a30| 65 72 20 69 73 20 75 73 | 65 64 20 75 6e 63 68 61 |er is us|ed uncha|
|00000a40| 6e 67 65 64 2e 0d 0a 0d | 0a 54 68 69 73 20 66 75 |nged....|.This fu|
|00000a50| 6e 63 74 69 6f 6e 20 69 | 73 20 6f 70 74 69 6f 6e |nction i|s option|
|00000a60| 61 6c 2e 20 20 49 66 20 | 69 74 27 73 20 6e 6f 74 |al. If |it's not|
|00000a70| 20 64 65 66 69 6e 65 64 | 20 62 79 20 79 6f 75 72 | defined| by your|
|00000a80| 20 67 61 6d 65 0d 0a 70 | 72 6f 67 72 61 6d 2c 20 | game..p|rogram, |
|00000a90| 74 68 65 20 63 6f 6d 70 | 69 6c 65 72 20 77 69 6c |the comp|iler wil|
|00000aa0| 6c 20 69 73 73 75 65 20 | 61 20 77 61 72 6e 69 6e |l issue |a warnin|
|00000ab0| 67 2c 20 62 75 74 20 79 | 6f 75 72 20 67 61 6d 65 |g, but y|our game|
|00000ac0| 20 77 69 6c 6c 0d 0a 73 | 74 69 6c 6c 20 63 6f 6d | will..s|till com|
|00000ad0| 70 69 6c 65 20 61 6e 64 | 20 72 75 6e 2e 20 20 54 |pile and| run. T|
|00000ae0| 68 65 20 7b 5c 74 74 20 | 70 72 65 70 61 72 73 65 |he {\tt |preparse|
|00000af0| 7d 20 66 75 6e 63 74 69 | 6f 6e 20 69 73 20 75 73 |} functi|on is us|
|00000b00| 65 66 75 6c 20 6f 6e 6c | 79 0d 0a 69 6e 20 63 65 |eful onl|y..in ce|
|00000b10| 72 74 61 69 6e 20 73 70 | 65 63 69 61 6c 20 73 69 |rtain sp|ecial si|
|00000b20| 74 75 61 74 69 6f 6e 73 | 3b 20 6d 6f 73 74 20 67 |tuations|; most g|
|00000b30| 61 6d 65 73 20 77 6f 6e | 27 74 20 6e 65 65 64 20 |ames won|'t need |
|00000b40| 69 74 2e 20 20 46 6f 72 | 0d 0a 65 78 61 6d 70 6c |it. For|..exampl|
|00000b50| 65 2c 20 79 6f 75 20 63 | 6f 75 6c 64 20 75 73 65 |e, you c|ould use|
|00000b60| 20 7b 5c 74 74 20 70 72 | 65 70 61 72 73 65 7d 20 | {\tt pr|eparse} |
|00000b70| 74 6f 20 69 6d 70 6c 65 | 6d 65 6e 74 20 61 20 73 |to imple|ment a s|
|00000b80| 70 65 63 69 61 6c 0d 0a | 65 66 66 65 63 74 20 72 |pecial..|effect r|
|00000b90| 6f 6f 6d 20 77 68 65 72 | 65 20 61 6e 79 74 68 69 |oom wher|e anythi|
|00000ba0| 6e 67 20 74 79 70 65 64 | 20 62 79 20 74 68 65 20 |ng typed| by the |
|00000bb0| 70 6c 61 79 65 72 20 28 | 65 76 65 6e 20 63 6f 6d |player (|even com|
|00000bc0| 70 6c 65 74 65 0d 0a 6e | 6f 6e 73 65 6e 73 65 29 |plete..n|onsense)|
|00000bd0| 20 69 73 20 6a 75 73 74 | 20 65 63 68 6f 65 64 20 | is just| echoed |
|00000be0| 75 6e 74 69 6c 20 61 20 | 73 70 65 63 69 61 6c 20 |until a |special |
|00000bf0| 63 6f 6d 6d 61 6e 64 20 | 69 73 20 74 79 70 65 64 |command |is typed|
|00000c00| 2e 0d 0a 0d 0a 5c 6d 61 | 6a 6f 72 73 65 63 74 69 |.....\ma|jorsecti|
|00000c10| 6f 6e 7b 54 68 65 20 50 | 6c 61 79 65 72 20 43 6f |on{The P|layer Co|
|00000c20| 6d 6d 61 6e 64 20 50 61 | 72 73 65 72 7d 0d 0a 0d |mmand Pa|rser}...|
|00000c30| 0a 54 68 65 20 70 6c 61 | 79 65 72 20 69 6e 74 65 |.The pla|yer inte|
|00000c40| 72 61 63 74 73 20 77 69 | 74 68 20 79 6f 75 72 20 |racts wi|th your |
|00000c50| 54 41 44 53 0d 0a 61 64 | 76 65 6e 74 75 72 65 20 |TADS..ad|venture |
|00000c60| 67 61 6d 65 20 73 74 72 | 69 63 74 6c 79 20 61 74 |game str|ictly at|
|00000c70| 20 74 68 65 20 6c 65 76 | 65 6c 20 6f 66 20 45 6e | the lev|el of En|
|00000c80| 67 6c 69 73 68 20 73 65 | 6e 74 65 6e 63 65 73 2e |glish se|ntences.|
|00000c90| 0d 0a 54 68 65 20 67 61 | 6d 65 20 64 65 73 63 72 |..The ga|me descr|
|00000ca0| 69 62 65 73 20 74 68 65 | 20 70 6c 61 79 65 72 27 |ibes the| player'|
|00000cb0| 73 20 77 68 65 72 65 61 | 62 6f 75 74 73 2c 20 61 |s wherea|bouts, a|
|00000cc0| 6e 64 20 74 68 65 20 70 | 6c 61 79 65 72 20 72 65 |nd the p|layer re|
|00000cd0| 73 70 6f 6e 64 73 20 77 | 69 74 68 20 61 0d 0a 63 |sponds w|ith a..c|
|00000ce0| 6f 6d 6d 61 6e 64 20 28 | 61 6e 20 69 6d 70 65 72 |ommand (|an imper|
|00000cf0| 61 74 69 76 65 20 73 65 | 6e 74 65 6e 63 65 29 20 |ative se|ntence) |
|00000d00| 74 6f 20 64 6f 20 73 6f | 6d 65 74 68 69 6e 67 3b |to do so|mething;|
|00000d10| 20 74 68 65 20 67 61 6d | 65 20 74 68 65 6e 20 72 | the gam|e then r|
|00000d20| 65 73 70 6f 6e 64 73 20 | 77 69 74 68 0d 0a 61 20 |esponds |with..a |
|00000d30| 64 65 73 63 72 69 70 74 | 69 6f 6e 20 6f 66 20 74 |descript|ion of t|
|00000d40| 68 65 20 72 65 73 75 6c | 74 73 20 6f 66 20 74 68 |he resul|ts of th|
|00000d50| 69 73 20 61 63 74 69 6f | 6e 2e 20 20 54 68 65 20 |is actio|n. The |
|00000d60| 70 6c 61 79 65 72 20 74 | 68 65 6e 20 69 73 73 75 |player t|hen issu|
|00000d70| 65 73 20 61 20 6e 65 77 | 0d 0a 63 6f 6d 6d 61 6e |es a new|..comman|
|00000d80| 64 2c 20 61 6e 64 20 74 | 68 65 20 67 61 6d 65 20 |d, and t|he game |
|00000d90| 72 65 73 70 6f 6e 64 73 | 20 74 6f 20 74 68 69 73 |responds| to this|
|00000da0| 20 6f 6e 65 2e 0d 0a 50 | 6c 61 79 20 70 72 6f 63 | one...P|lay proc|
|00000db0| 65 65 64 73 20 69 6e 20 | 74 68 69 73 20 6d 61 6e |eeds in |this man|
|00000dc0| 6e 65 72 20 75 6e 74 69 | 6c 20 74 68 65 20 70 6c |ner unti|l the pl|
|00000dd0| 61 79 65 72 20 67 65 74 | 73 20 74 69 72 65 64 20 |ayer get|s tired |
|00000de0| 6f 66 0d 0a 74 68 69 73 | 20 61 6e 64 20 71 75 69 |of..this| and qui|
|00000df0| 74 73 20 28 6f 72 20 63 | 6f 6d 70 6c 65 74 65 73 |ts (or c|ompletes|
|00000e00| 20 74 68 65 20 67 61 6d | 65 29 2e 0d 0a 0d 0a 54 | the gam|e).....T|
|00000e10| 68 65 20 6d 6f 73 74 20 | 69 6d 70 6f 72 74 61 6e |he most |importan|
|00000e20| 74 20 70 61 72 74 20 6f | 66 20 74 68 65 20 67 61 |t part o|f the ga|
|00000e30| 6d 65 20 61 73 20 66 61 | 72 20 61 73 20 74 68 65 |me as fa|r as the|
|00000e40| 20 70 6c 61 79 65 72 20 | 69 73 20 63 6f 6e 63 65 | player |is conce|
|00000e50| 72 6e 65 64 20 69 73 20 | 74 68 65 0d 0a 73 74 6f |rned is |the..sto|
|00000e60| 72 79 3b 20 74 68 61 74 | 20 69 73 2c 20 74 68 65 |ry; that| is, the|
|00000e70| 20 64 65 73 63 72 69 70 | 74 69 6f 6e 73 20 6f 66 | descrip|tions of|
|00000e80| 20 6c 6f 63 61 74 69 6f | 6e 73 2c 20 70 65 6f 70 | locatio|ns, peop|
|00000e90| 6c 65 2c 20 61 6e 64 20 | 74 68 69 6e 67 73 2c 20 |le, and |things, |
|00000ea0| 61 6e 64 20 74 68 65 0d | 0a 72 65 73 70 6f 6e 73 |and the.|.respons|
|00000eb0| 65 73 20 74 6f 20 63 6f | 6d 6d 61 6e 64 73 2e 20 |es to co|mmands. |
|00000ec0| 20 54 68 65 20 61 64 76 | 65 6e 74 75 72 65 20 77 | The adv|enture w|
|00000ed0| 72 69 74 65 72 27 73 20 | 6a 6f 62 20 69 73 20 74 |riter's |job is t|
|00000ee0| 6f 20 6d 61 6b 65 20 74 | 68 69 73 20 70 61 72 74 |o make t|his part|
|00000ef0| 0d 0a 69 6e 74 65 72 65 | 73 74 69 6e 67 2e 0d 0a |..intere|sting...|
|00000f00| 0d 0a 48 6f 77 65 76 65 | 72 2c 20 61 20 76 65 72 |..Howeve|r, a ver|
|00000f10| 79 20 69 6d 70 6f 72 74 | 61 6e 74 20 70 61 72 74 |y import|ant part|
|00000f20| 20 6f 66 20 74 68 65 20 | 67 61 6d 65 2c 20 77 68 | of the |game, wh|
|00000f30| 69 63 68 20 69 73 20 69 | 64 65 61 6c 6c 79 20 69 |ich is i|deally i|
|00000f40| 6e 76 69 73 69 62 6c 65 | 20 74 6f 20 74 68 65 0d |nvisible| to the.|
|00000f50| 0a 70 6c 61 79 65 72 2c | 20 69 73 20 74 68 65 20 |.player,| is the |
|00000f60| 70 61 72 73 65 72 2e 20 | 20 54 68 65 20 70 61 72 |parser. | The par|
|00000f70| 73 65 72 20 69 6e 73 70 | 65 63 74 73 20 74 68 65 |ser insp|ects the|
|00000f80| 20 70 6c 61 79 65 72 27 | 73 20 63 6f 6d 6d 61 6e | player'|s comman|
|00000f90| 64 73 2c 20 61 6e 64 20 | 61 74 74 65 6d 70 74 73 |ds, and |attempts|
|00000fa0| 0d 0a 74 6f 20 6d 61 6b | 65 20 74 68 65 6d 20 69 |..to mak|e them i|
|00000fb0| 6e 74 65 6c 6c 69 67 69 | 62 6c 65 20 74 6f 20 74 |ntelligi|ble to t|
|00000fc0| 68 65 20 67 61 6d 65 20 | 61 73 20 69 6d 70 6c 65 |he game |as imple|
|00000fd0| 6d 65 6e 74 65 64 20 62 | 79 20 74 68 65 20 61 64 |mented b|y the ad|
|00000fe0| 76 65 6e 74 75 72 65 20 | 77 72 69 74 65 72 2e 0d |venture |writer..|
|00000ff0| 0a 57 65 20 73 61 79 20 | 74 68 61 74 20 74 68 65 |.We say |that the|
|00001000| 20 70 61 72 73 65 72 20 | 69 73 20 60 60 69 64 65 | parser |is ``ide|
|00001010| 61 6c 6c 79 20 69 6e 76 | 69 73 69 62 6c 65 22 0d |ally inv|isible".|
|00001020| 0a 62 65 63 61 75 73 65 | 20 74 68 65 20 70 6c 61 |.because| the pla|
|00001030| 79 65 72 20 73 68 6f 75 | 6c 64 6e 27 74 20 68 61 |yer shou|ldn't ha|
|00001040| 76 65 20 74 6f 20 77 6f | 72 72 79 20 61 62 6f 75 |ve to wo|rry abou|
|00001050| 74 2d 2d 2d 6f 72 20 65 | 76 65 6e 20 6e 6f 74 69 |t---or e|ven noti|
|00001060| 63 65 2d 2d 2d 74 68 65 | 0d 0a 70 61 72 73 65 72 |ce---the|..parser|
|00001070| 2e 20 20 50 6c 61 79 65 | 72 73 20 6e 65 76 65 72 |. Playe|rs never|
|00001080| 20 6e 6f 74 69 63 65 20 | 74 68 65 20 70 61 72 73 | notice |the pars|
|00001090| 65 72 20 77 68 65 6e 20 | 69 74 20 75 6e 64 65 72 |er when |it under|
|000010a0| 73 74 61 6e 64 73 20 77 | 68 61 74 20 74 68 65 79 |stands w|hat they|
|000010b0| 20 73 61 79 3b 0d 0a 69 | 74 27 73 20 77 68 65 6e | say;..i|t's when|
|000010c0| 20 74 68 65 20 70 61 72 | 73 65 72 20 63 61 6e 27 | the par|ser can'|
|000010d0| 74 20 75 6e 64 65 72 73 | 74 61 6e 64 2c 20 6f 72 |t unders|tand, or|
|000010e0| 20 77 6f 72 73 65 2c 20 | 6d 69 73 75 6e 64 65 72 | worse, |misunder|
|000010f0| 73 74 61 6e 64 73 20 61 | 0d 0a 63 6f 6d 6d 61 6e |stands a|..comman|
|00001100| 64 2c 20 74 68 61 74 20 | 74 68 65 20 70 6c 61 79 |d, that |the play|
|00001110| 65 72 20 6e 6f 74 69 63 | 65 73 20 74 68 65 20 70 |er notic|es the p|
|00001120| 61 72 73 65 72 2e 0d 0a | 0d 0a 54 68 65 20 6a 6f |arser...|..The jo|
|00001130| 62 20 6f 66 20 6d 61 6b | 69 6e 67 20 74 68 65 20 |b of mak|ing the |
|00001140| 70 61 72 73 65 72 20 69 | 6e 76 69 73 69 62 6c 65 |parser i|nvisible|
|00001150| 20 69 73 0d 0a 6d 6f 73 | 74 6c 79 20 69 6e 20 74 | is..mos|tly in t|
|00001160| 68 65 20 68 61 6e 64 73 | 20 6f 66 20 74 68 65 20 |he hands| of the |
|00001170| 54 41 44 53 20 72 75 6e | 2d 74 69 6d 65 20 73 79 |TADS run|-time sy|
|00001180| 73 74 65 6d 2c 20 77 68 | 69 63 68 20 74 72 69 65 |stem, wh|ich trie|
|00001190| 73 20 74 6f 20 65 6e 73 | 75 72 65 20 74 68 61 74 |s to ens|ure that|
|000011a0| 0d 0a 6d 61 6e 79 20 64 | 69 66 66 65 72 65 6e 74 |..many d|ifferent|
|000011b0| 20 6b 69 6e 64 73 0d 0a | 6f 66 20 73 65 6e 74 65 | kinds..|of sente|
|000011c0| 6e 63 65 73 20 61 72 65 | 20 75 6e 64 65 72 73 74 |nces are| underst|
|000011d0| 6f 6f 64 2e 20 20 48 6f | 77 65 76 65 72 2c 20 74 |ood. Ho|wever, t|
|000011e0| 68 65 20 61 64 76 65 6e | 74 75 72 65 20 77 72 69 |he adven|ture wri|
|000011f0| 74 65 72 20 69 73 20 72 | 65 73 70 6f 6e 73 69 62 |ter is r|esponsib|
|00001200| 6c 65 20 66 6f 72 0d 0a | 6d 61 6b 69 6e 67 20 73 |le for..|making s|
|00001210| 75 72 65 20 74 68 61 74 | 20 6d 61 6e 79 20 73 79 |ure that| many sy|
|00001220| 6e 6f 6e 79 6d 73 20 61 | 72 65 20 72 65 63 6f 67 |nonyms a|re recog|
|00001230| 6e 69 7a 65 64 20 66 6f | 72 20 65 61 63 68 20 77 |nized fo|r each w|
|00001240| 6f 72 64 2c 20 62 65 63 | 61 75 73 65 20 64 69 66 |ord, bec|ause dif|
|00001250| 66 65 72 65 6e 74 0d 0a | 70 65 6f 70 6c 65 20 68 |ferent..|people h|
|00001260| 61 76 65 20 64 69 66 66 | 65 72 65 6e 74 20 76 6f |ave diff|erent vo|
|00001270| 63 61 62 75 6c 61 72 69 | 65 73 2e 20 20 41 20 67 |cabulari|es. A g|
|00001280| 6f 6f 64 20 72 75 6c 65 | 20 6f 66 20 74 68 75 6d |ood rule| of thum|
|00001290| 62 20 69 73 20 74 68 61 | 74 20 67 61 6d 65 20 73 |b is tha|t game s|
|000012a0| 68 6f 75 6c 64 0d 0a 75 | 6e 64 65 72 73 74 61 6e |hould..u|nderstan|
|000012b0| 64 20 61 6c 6c 20 74 68 | 65 20 77 6f 72 64 73 20 |d all th|e words |
|000012c0| 69 74 20 75 73 65 73 2c | 20 70 61 72 74 69 63 75 |it uses,| particu|
|000012d0| 6c 61 72 6c 79 20 74 68 | 6f 73 65 20 72 65 66 65 |larly th|ose refe|
|000012e0| 72 72 69 6e 67 20 74 6f | 20 69 6d 70 6f 72 74 61 |rring to| importa|
|000012f0| 6e 74 0d 0a 6f 62 6a 65 | 63 74 73 2e 0d 0a 0d 0a |nt..obje|cts.....|
|00001300| 41 6c 6c 20 70 6c 61 79 | 65 72 20 63 6f 6d 6d 61 |All play|er comma|
|00001310| 6e 64 73 20 68 61 76 65 | 20 61 20 5e 7b 76 65 72 |nds have| a ^{ver|
|00001320| 62 7d 2e 20 20 41 20 76 | 65 72 62 20 69 73 20 61 |b}. A v|erb is a|
|00001330| 6c 6c 20 73 6f 6d 65 20 | 63 6f 6d 6d 61 6e 64 73 |ll some |commands|
|00001340| 20 68 61 76 65 3b 0d 0a | 66 6f 72 20 65 78 61 6d | have;..|for exam|
|00001350| 70 6c 65 2c 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |ple, the| command|
|00001360| 73 20 60 60 6c 6f 6f 6b | 22 20 61 6e 64 20 60 60 |s ``look|" and ``|
|00001370| 65 61 73 74 22 20 68 61 | 76 65 20 6f 6e 6c 79 20 |east" ha|ve only |
|00001380| 61 20 76 65 72 62 2e 0d | 0a 0d 0a 4f 74 68 65 72 |a verb..|...Other|
|00001390| 20 63 6f 6d 6d 61 6e 64 | 73 20 74 61 6b 65 20 61 | command|s take a|
|000013a0| 20 5e 7b 64 69 72 65 63 | 74 20 6f 62 6a 65 63 74 | ^{direc|t object|
|000013b0| 7d 20 61 73 20 77 65 6c | 6c 3a 20 20 60 60 74 61 |} as wel|l: ``ta|
|000013c0| 6b 65 20 74 68 65 20 62 | 6f 6f 6b 22 20 61 6e 64 |ke the b|ook" and|
|000013d0| 20 60 60 64 72 6f 70 0d | 0a 74 68 65 20 62 6f 78 | ``drop.|.the box|
|000013e0| 2e 22 0d 0a 4e 6f 74 65 | 20 74 68 61 74 20 74 68 |."..Note| that th|
|000013f0| 65 20 5e 7b 61 72 74 69 | 63 6c 65 7d 20 60 60 74 |e ^{arti|cle} ``t|
|00001400| 68 65 22 20 69 73 20 6f | 70 74 69 6f 6e 61 6c 2e |he" is o|ptional.|
|00001410| 0d 0a 55 6e 6c 69 6b 65 | 20 73 6f 6d 65 20 61 64 |..Unlike| some ad|
|00001420| 76 65 6e 74 75 72 65 20 | 70 61 72 73 65 72 73 2c |venture |parsers,|
|00001430| 20 74 68 65 20 54 41 44 | 53 20 70 61 72 73 65 72 | the TAD|S parser|
|00001440| 20 77 69 6c 6c 0d 0a 6e | 6f 74 20 69 67 6e 6f 72 | will..n|ot ignor|
|00001450| 65 20 74 68 65 20 61 72 | 74 69 63 6c 65 3b 20 69 |e the ar|ticle; i|
|00001460| 74 20 77 69 6c 6c 20 65 | 6e 73 75 72 65 20 74 68 |t will e|nsure th|
|00001470| 61 74 20 61 72 74 69 63 | 6c 65 73 20 61 72 65 20 |at artic|les are |
|00001480| 75 73 65 64 20 6f 6e 6c | 79 20 77 69 74 68 20 6e |used onl|y with n|
|00001490| 6f 75 6e 73 2c 0d 0a 62 | 75 74 20 74 68 65 20 61 |ouns,..b|ut the a|
|000014a0| 72 74 69 63 6c 65 20 77 | 69 6c 6c 20 6f 62 76 69 |rticle w|ill obvi|
|000014b0| 6f 75 73 6c 79 20 6e 6f | 74 20 61 66 66 65 63 74 |ously no|t affect|
|000014c0| 20 74 68 65 20 6d 65 61 | 6e 69 6e 67 20 6f 66 20 | the mea|ning of |
|000014d0| 74 68 65 20 6e 6f 75 6e | 2e 0d 0a 0d 0a 53 6f 6d |the noun|.....Som|
|000014e0| 65 20 63 6f 6d 6d 61 6e | 64 73 20 74 61 6b 65 20 |e comman|ds take |
|000014f0| 61 6e 20 5e 7b 69 6e 64 | 69 72 65 63 74 20 6f 62 |an ^{ind|irect ob|
|00001500| 6a 65 63 74 7d 20 61 73 | 20 77 65 6c 6c 3a 20 20 |ject} as| well: |
|00001510| 60 60 70 75 74 20 74 68 | 65 20 62 6f 6f 6b 20 69 |``put th|e book i|
|00001520| 6e 20 74 68 65 20 62 6f | 78 22 0d 0a 61 6e 64 20 |n the bo|x"..and |
|00001530| 60 60 67 69 76 65 20 74 | 68 65 20 6c 69 62 72 61 |``give t|he libra|
|00001540| 72 69 61 6e 20 74 68 65 | 20 62 6f 6f 6b 2e 22 0d |rian the| book.".|
|00001550| 0a 54 68 65 20 66 69 72 | 73 74 20 63 6f 6d 6d 61 |.The fir|st comma|
|00001560| 6e 64 20 75 73 65 73 20 | 61 20 5e 7b 70 72 65 70 |nd uses |a ^{prep|
|00001570| 6f 73 69 74 69 6f 6e 7d | 20 74 6f 20 69 64 65 6e |osition}| to iden|
|00001580| 74 69 66 79 20 74 68 65 | 20 69 6e 64 69 72 65 63 |tify the| indirec|
|00001590| 74 20 6f 62 6a 65 63 74 | 3b 20 74 68 65 0d 0a 73 |t object|; the..s|
|000015a0| 65 63 6f 6e 64 20 75 73 | 65 73 20 74 68 65 20 70 |econd us|es the p|
|000015b0| 6f 73 69 74 69 6f 6e 73 | 20 6f 66 20 74 68 65 20 |ositions| of the |
|000015c0| 77 6f 72 64 73 20 69 6e | 20 74 68 65 20 73 65 6e |words in| the sen|
|000015d0| 74 65 6e 63 65 20 74 6f | 20 73 70 65 63 69 66 79 |tence to| specify|
|000015e0| 20 77 68 69 63 68 0d 0a | 6f 62 6a 65 63 74 20 69 | which..|object i|
|000015f0| 73 20 77 68 69 63 68 2e | 0d 0a 0d 0a 53 6f 6d 65 |s which.|....Some|
|00001600| 20 76 65 72 62 73 20 61 | 72 65 20 61 20 6c 69 74 | verbs a|re a lit|
|00001610| 74 6c 65 20 6d 6f 72 65 | 20 63 6f 6d 70 6c 69 63 |tle more| complic|
|00001620| 61 74 65 64 3b 20 63 6f | 6e 73 69 64 65 72 20 60 |ated; co|nsider `|
|00001630| 60 70 69 63 6b 20 75 70 | 20 74 68 65 20 62 6f 6f |`pick up| the boo|
|00001640| 6b 22 20 61 6e 64 0d 0a | 60 60 70 69 63 6b 20 69 |k" and..|``pick i|
|00001650| 74 20 75 70 2e 22 0d 0a | 49 6e 20 74 68 65 73 65 |t up."..|In these|
|00001660| 20 63 61 73 65 73 2c 20 | 74 68 65 20 70 72 65 70 | cases, |the prep|
|00001670| 6f 73 69 74 69 6f 6e 20 | 69 73 20 63 6f 6e 73 69 |osition |is consi|
|00001680| 64 65 72 65 64 20 70 61 | 72 74 20 6f 66 20 74 68 |dered pa|rt of th|
|00001690| 65 20 76 65 72 62 2c 20 | 73 6f 20 74 68 65 20 76 |e verb, |so the v|
|000016a0| 65 72 62 0d 0a 70 61 72 | 74 20 69 73 20 60 60 70 |erb..par|t is ``p|
|000016b0| 69 63 6b 20 75 70 22 20 | 61 6e 64 20 74 68 65 20 |ick up" |and the |
|000016c0| 64 69 72 65 63 74 20 6f | 62 6a 65 63 74 20 69 73 |direct o|bject is|
|000016d0| 20 60 60 74 68 65 20 62 | 6f 6f 6b 2e 22 0d 0a 0d | ``the b|ook."...|
|000016e0| 0a 4e 6f 74 65 20 74 68 | 61 74 20 74 68 65 20 54 |.Note th|at the T|
|000016f0| 41 44 53 20 70 61 72 73 | 65 72 20 63 61 6e 20 6f |ADS pars|er can o|
|00001700| 6e 6c 79 20 68 61 6e 64 | 6c 65 20 70 72 65 70 6f |nly hand|le prepo|
|00001710| 73 69 74 69 6f 6e 73 20 | 74 68 61 74 20 63 6f 6e |sitions |that con|
|00001720| 73 69 73 74 0d 0a 6f 66 | 20 61 20 73 69 6e 67 6c |sist..of| a singl|
|00001730| 65 20 77 6f 72 64 2e 20 | 20 55 6e 66 6f 72 74 75 |e word. | Unfortu|
|00001740| 6e 61 74 65 6c 79 2c 20 | 45 6e 67 6c 69 73 68 20 |nately, |English |
|00001750| 68 61 73 20 6d 61 6e 79 | 20 63 6f 6e 73 74 72 75 |has many| constru|
|00001760| 63 74 69 6f 6e 73 0d 0a | 69 6e 20 77 68 69 63 68 |ctions..|in which|
|00001770| 20 6d 75 6c 74 69 70 6c | 65 20 70 72 65 70 6f 73 | multipl|e prepos|
|00001780| 69 74 69 6f 6e 73 20 61 | 72 65 20 6e 65 65 64 65 |itions a|re neede|
|00001790| 64 3b 20 66 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |d; for e|xample, |
|000017a0| 60 60 74 61 6b 65 20 74 | 68 65 0d 0a 62 6f 6f 6b |``take t|he..book|
|000017b0| 20 6f 75 74 20 6f 66 20 | 74 68 65 20 62 61 67 27 | out of |the bag'|
|000017c0| 27 20 68 61 73 20 74 77 | 6f 20 70 72 65 70 6f 73 |' has tw|o prepos|
|000017d0| 69 74 69 6f 6e 73 20 69 | 6e 20 61 20 72 6f 77 2e |itions i|n a row.|
|000017e0| 0d 0a 0d 0a 54 68 65 72 | 65 27 73 20 61 20 73 70 |....Ther|e's a sp|
|000017f0| 65 63 69 61 6c 20 6d 65 | 63 68 61 6e 69 73 6d 20 |ecial me|chanism |
|00001800| 74 68 61 74 20 61 6c 6c | 6f 77 73 20 79 6f 75 20 |that all|ows you |
|00001810| 74 6f 20 64 65 66 69 6e | 65 20 77 6f 72 64 73 20 |to defin|e words |
|00001820| 74 68 61 74 20 61 72 65 | 0d 0a 60 60 67 6c 75 65 |that are|..``glue|
|00001830| 64 20 74 6f 67 65 74 68 | 65 72 27 27 20 77 68 65 |d togeth|er'' whe|
|00001840| 6e 20 74 68 65 79 20 61 | 70 70 65 61 72 20 69 6e |n they a|ppear in|
|00001850| 20 63 65 72 74 61 69 6e | 20 63 6f 6d 62 69 6e 61 | certain| combina|
|00001860| 74 69 6f 6e 73 2e 20 20 | 54 68 69 73 0d 0a 6d 65 |tions. |This..me|
|00001870| 63 68 61 6e 69 73 6d 20 | 69 73 20 69 6e 74 65 6e |chanism |is inten|
|00001880| 64 65 64 20 74 6f 20 61 | 6c 6c 6f 77 20 66 6f 72 |ded to a|llow for|
|00001890| 20 70 72 65 70 6f 73 69 | 74 69 6f 6e 73 20 74 68 | preposi|tions th|
|000018a0| 61 74 20 63 6f 6e 73 69 | 73 74 20 6f 66 0d 0a 6d |at consi|st of..m|
|000018b0| 75 6c 74 69 70 6c 65 20 | 77 6f 72 64 73 2c 20 62 |ultiple |words, b|
|000018c0| 75 74 20 77 68 69 63 68 | 20 63 61 6e 20 62 65 20 |ut which| can be |
|000018d0| 74 72 65 61 74 65 64 20 | 61 73 20 61 20 73 69 6e |treated |as a sin|
|000018e0| 67 6c 65 20 77 6f 72 64 | 20 75 6e 69 74 2e 0d 0a |gle word| unit...|
|000018f0| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 60 60 6f |For exam|ple, ``o|
|00001900| 75 74 20 6f 66 27 27 20 | 63 61 6e 20 62 65 20 63 |ut of'' |can be c|
|00001910| 6f 6e 76 65 72 74 65 64 | 20 74 6f 20 61 20 73 69 |onverted| to a si|
|00001920| 6e 67 6c 65 20 77 6f 72 | 64 2e 20 20 49 6e 20 6f |ngle wor|d. In o|
|00001930| 72 64 65 72 0d 0a 74 6f | 20 64 65 66 69 6e 65 20 |rder..to| define |
|00001940| 77 6f 72 64 73 20 74 68 | 61 74 20 63 61 6e 20 62 |words th|at can b|
|00001950| 65 20 63 6f 6e 76 65 72 | 74 65 64 20 69 6e 74 6f |e conver|ted into|
|00001960| 20 61 20 75 6e 69 74 20 | 77 68 65 6e 20 75 73 65 | a unit |when use|
|00001970| 64 20 74 6f 67 65 74 68 | 65 72 2c 0d 0a 79 6f 75 |d togeth|er,..you|
|00001980| 20 75 73 65 20 74 68 65 | 20 7b 5c 74 74 20 63 6f | use the| {\tt co|
|00001990| 6d 70 6f 75 6e 64 57 6f | 72 64 7d 20 73 74 61 74 |mpoundWo|rd} stat|
|000019a0| 65 6d 65 6e 74 2e 20 20 | 54 68 69 73 20 73 74 61 |ement. |This sta|
|000019b0| 74 65 6d 65 6e 74 20 61 | 70 70 65 61 72 73 0d 0a |tement a|ppears..|
|000019c0| 69 6e 20 79 6f 75 72 20 | 67 61 6d 65 20 66 69 6c |in your |game fil|
|000019d0| 65 20 6f 75 74 73 69 64 | 65 20 6f 66 20 66 75 6e |e outsid|e of fun|
|000019e0| 63 74 69 6f 6e 73 20 61 | 6e 64 20 6f 62 6a 65 63 |ctions a|nd objec|
|000019f0| 74 73 3b 20 7b 5c 74 74 | 20 61 64 76 2e 74 7d 0d |ts; {\tt| adv.t}.|
|00001a00| 0a 64 65 66 69 6e 65 73 | 20 61 20 6c 61 72 67 65 |.defines| a large|
|00001a10| 20 6c 69 73 74 20 6f 66 | 20 63 6f 6d 70 6f 75 6e | list of| compoun|
|00001a20| 64 20 77 6f 72 64 73 2c | 20 77 68 69 63 68 20 73 |d words,| which s|
|00001a30| 68 6f 75 6c 64 20 62 65 | 20 73 75 66 66 69 63 69 |hould be| suffici|
|00001a40| 65 6e 74 0d 0a 66 6f 72 | 20 6d 6f 73 74 20 67 61 |ent..for| most ga|
|00001a50| 6d 65 73 2e 0d 0a 5e 5e | 7b 63 6f 6d 70 6f 75 6e |mes...^^|{compoun|
|00001a60| 64 57 6f 72 64 7d 0d 0a | 0d 0a 41 20 7b 5c 74 74 |dWord}..|..A {\tt|
|00001a70| 20 63 6f 6d 70 6f 75 6e | 64 57 6f 72 64 7d 20 73 | compoun|dWord} s|
|00001a80| 74 61 74 65 6d 65 6e 74 | 20 6c 6f 6f 6b 73 20 6c |tatement| looks l|
|00001a90| 69 6b 65 20 74 68 69 73 | 3a 0d 0a 0d 0a 7b 5c 65 |ike this|:....{\e|
|00001aa0| 78 61 6d 70 6c 65 0d 0a | 63 6f 6d 70 6f 75 6e 64 |xample..|compound|
|00001ab0| 57 6f 72 64 20 27 6f 75 | 74 27 20 27 6f 66 27 20 |Word 'ou|t' 'of' |
|00001ac0| 27 6f 75 74 6f 66 27 3b | 0d 0a 7d 5c 6d 65 64 73 |'outof';|..}\meds|
|00001ad0| 6b 69 70 5c 6e 6f 69 6e | 64 65 6e 74 0d 0a 0d 0a |kip\noin|dent....|
|00001ae0| 54 68 69 73 20 74 65 6c | 6c 73 20 74 68 65 20 70 |This tel|ls the p|
|00001af0| 61 72 73 65 72 20 74 68 | 61 74 20 77 68 65 6e 20 |arser th|at when |
|00001b00| 69 74 20 73 65 65 73 20 | 74 68 65 20 74 77 6f 2d |it sees |the two-|
|00001b10| 77 6f 72 64 20 73 65 71 | 75 65 6e 63 65 20 60 60 |word seq|uence ``|
|00001b20| 6f 75 74 20 6f 66 27 27 | 2c 0d 0a 69 74 20 73 68 |out of''|,..it sh|
|00001b30| 6f 75 6c 64 20 63 6f 6e | 76 65 72 74 20 69 74 20 |ould con|vert it |
|00001b40| 74 6f 20 74 68 65 20 73 | 69 6e 67 6c 65 20 77 6f |to the s|ingle wo|
|00001b50| 72 64 20 60 60 6f 75 74 | 6f 66 27 27 2e 20 20 54 |rd ``out|of''. T|
|00001b60| 68 65 20 63 6f 6d 70 6f | 75 6e 64 20 77 6f 72 64 |he compo|und word|
|00001b70| 0d 0a 60 60 6f 75 74 6f | 66 27 27 20 69 73 20 6e |..``outo|f'' is n|
|00001b80| 6f 77 20 75 73 61 62 6c | 65 20 69 6e 20 76 6f 63 |ow usabl|e in voc|
|00001b90| 61 62 75 6c 61 72 79 20 | 28 73 75 63 68 20 61 73 |abulary |(such as|
|00001ba0| 20 69 6e 20 61 20 7b 5c | 74 74 20 70 72 65 70 6f | in a {\|tt prepo|
|00001bb0| 73 69 74 69 6f 6e 7d 0d | 0a 70 72 6f 70 65 72 74 |sition}.|.propert|
|00001bc0| 79 29 2e 0d 0a 0d 0a 4e | 6f 74 65 20 74 68 61 74 |y).....N|ote that|
|00001bd0| 20 79 6f 75 20 63 61 6e | 27 74 0d 0a 64 69 72 65 | you can|'t..dire|
|00001be0| 63 74 6c 79 20 64 65 66 | 69 6e 65 20 74 68 72 65 |ctly def|ine thre|
|00001bf0| 65 2d 77 6f 72 64 20 28 | 6f 72 20 6c 6f 6e 67 65 |e-word (|or longe|
|00001c00| 72 29 20 63 6f 6d 70 6f | 75 6e 64 20 77 6f 72 64 |r) compo|und word|
|00001c10| 73 2c 20 62 75 74 20 79 | 6f 75 20 63 61 6e 20 64 |s, but y|ou can d|
|00001c20| 6f 0d 0a 73 6f 20 69 6e | 64 69 72 65 63 74 6c 79 |o..so in|directly|
|00001c30| 20 62 79 20 63 6f 6e 73 | 74 72 75 63 74 69 6e 67 | by cons|tructing|
|00001c40| 20 74 68 65 20 6c 6f 6e | 67 65 72 20 77 6f 72 64 | the lon|ger word|
|00001c50| 73 20 6f 75 74 20 6f 66 | 20 74 77 6f 2d 77 6f 72 |s out of| two-wor|
|00001c60| 64 0d 0a 64 69 72 65 63 | 74 69 76 65 73 2e 20 20 |d..direc|tives. |
|00001c70| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 74 6f 20 |For exam|ple, to |
|00001c80| 63 6f 6e 76 65 72 74 20 | 60 60 6f 75 74 20 66 72 |convert |``out fr|
|00001c90| 6f 6d 20 75 6e 64 65 72 | 27 27 20 69 6e 74 6f 20 |om under|'' into |
|00001ca0| 60 60 6f 75 74 66 72 6f | 6d 75 6e 64 65 72 27 27 |``outfro|munder''|
|00001cb0| 2c 0d 0a 79 6f 75 27 64 | 20 64 6f 20 74 68 69 73 |,..you'd| do this|
|00001cc0| 3a 0d 0a 0d 0a 7b 5c 65 | 78 61 6d 70 6c 65 0d 0a |:....{\e|xample..|
|00001cd0| 63 6f 6d 70 6f 75 6e 64 | 57 6f 72 64 20 27 6f 75 |compound|Word 'ou|
|00001ce0| 74 27 20 27 66 72 6f 6d | 27 20 27 6f 75 74 66 72 |t' 'from|' 'outfr|
|00001cf0| 6f 6d 27 3b 0d 0a 63 6f | 6d 70 6f 75 6e 64 57 6f |om';..co|mpoundWo|
|00001d00| 72 64 20 27 6f 75 74 66 | 72 6f 6d 27 20 27 75 6e |rd 'outf|rom' 'un|
|00001d10| 64 65 72 27 20 27 6f 75 | 74 66 72 6f 6d 75 6e 64 |der' 'ou|tfromund|
|00001d20| 65 72 27 3b 0d 0a 7d 5c | 6d 65 64 73 6b 69 70 5c |er';..}\|medskip\|
|00001d30| 6e 6f 69 6e 64 65 6e 74 | 0d 0a 0d 0a 4e 6f 74 65 |noindent|....Note|
|00001d40| 20 74 68 61 74 20 74 68 | 65 20 72 65 73 75 6c 74 | that th|e result|
|00001d50| 69 6e 67 20 77 6f 72 64 | 20 28 74 68 65 20 74 68 |ing word| (the th|
|00001d60| 69 72 64 20 77 6f 72 64 | 20 69 6e 20 61 20 7b 5c |ird word| in a {\|
|00001d70| 74 74 20 63 6f 6d 70 6f | 75 6e 64 57 6f 72 64 7d |tt compo|undWord}|
|00001d80| 0d 0a 63 6f 6d 6d 61 6e | 64 29 20 64 6f 65 73 6e |..comman|d) doesn|
|00001d90| 27 74 20 68 61 76 65 20 | 74 6f 20 62 65 20 74 68 |'t have |to be th|
|00001da0| 65 20 73 65 63 6f 6e 64 | 20 77 6f 72 64 20 61 70 |e second| word ap|
|00001db0| 70 65 6e 64 65 64 20 74 | 6f 20 74 68 65 20 66 69 |pended t|o the fi|
|00001dc0| 72 73 74 3b 0d 0a 6f 6c | 64 65 72 20 76 65 72 73 |rst;..ol|der vers|
|00001dd0| 69 6f 6e 73 20 6f 66 20 | 54 41 44 53 20 62 75 69 |ions of |TADS bui|
|00001de0| 6c 74 20 74 68 65 69 72 | 20 63 6f 6d 70 6f 75 6e |lt their| compoun|
|00001df0| 64 20 77 6f 72 64 73 20 | 61 75 74 6f 6d 61 74 69 |d words |automati|
|00001e00| 63 61 6c 6c 79 20 69 6e | 0d 0a 74 68 69 73 20 6d |cally in|..this m|
|00001e10| 61 6e 6e 65 72 2c 20 74 | 68 6f 75 67 68 2c 20 73 |anner, t|hough, s|
|00001e20| 6f 20 69 74 20 69 73 20 | 61 20 72 65 61 73 6f 6e |o it is |a reason|
|00001e30| 61 62 6c 65 20 63 6f 6e | 76 65 6e 74 69 6f 6e 20 |able con|vention |
|00001e40| 74 6f 20 66 6f 6c 6c 6f | 77 2e 0d 0a 59 6f 75 20 |to follo|w...You |
|00001e50| 63 6f 75 6c 64 20 6a 75 | 73 74 20 61 73 20 65 61 |could ju|st as ea|
|00001e60| 73 69 6c 79 20 64 65 66 | 69 6e 65 20 74 68 65 20 |sily def|ine the |
|00001e70| 63 6f 6d 70 6f 75 6e 64 | 20 77 6f 72 64 20 62 75 |compound| word bu|
|00001e80| 69 6c 74 20 66 72 6f 6d | 0d 0a 60 60 6f 75 74 20 |ilt from|..``out |
|00001e90| 66 72 6f 6d 27 27 20 74 | 6f 20 62 65 20 7b 5c 74 |from'' t|o be {\t|
|00001ea0| 74 20 27 6f 75 74 2d 66 | 72 6f 6d 27 7d 2c 20 6f |t 'out-f|rom'}, o|
|00001eb0| 72 20 7b 5c 74 74 20 27 | 61 73 64 66 27 7d 2c 20 |r {\tt '|asdf'}, |
|00001ec0| 6f 72 20 61 6e 79 74 68 | 69 6e 67 20 65 6c 73 65 |or anyth|ing else|
|00001ed0| 2e 0d 0a 0d 0a 54 68 65 | 72 65 27 73 20 6f 6e 65 |.....The|re's one|
|00001ee0| 20 6d 6f 72 65 20 66 65 | 61 74 75 72 65 3a 20 20 | more fe|ature: |
|00001ef0| 74 68 65 20 70 6c 61 79 | 65 72 20 63 61 6e 20 69 |the play|er can i|
|00001f00| 73 73 75 65 20 61 20 63 | 6f 6d 6d 61 6e 64 20 74 |ssue a c|ommand t|
|00001f10| 6f 20 61 6e 6f 74 68 65 | 72 0d 0a 63 68 61 72 61 |o anothe|r..chara|
|00001f20| 63 74 65 72 20 69 6e 20 | 74 68 65 20 67 61 6d 65 |cter in |the game|
|00001f30| 20 28 63 61 6c 6c 65 64 | 20 61 6e 20 60 60 5e 7b | (called| an ``^{|
|00001f40| 61 63 74 6f 72 7d 22 29 | 20 62 79 20 70 72 65 66 |actor}")| by pref|
|00001f50| 61 63 69 6e 67 20 61 20 | 73 65 6e 74 65 6e 63 65 |acing a |sentence|
|00001f60| 0d 0a 77 69 74 68 20 74 | 68 65 20 63 68 61 72 61 |..with t|he chara|
|00001f70| 63 74 65 72 27 73 20 6e | 61 6d 65 20 61 6e 64 20 |cter's n|ame and |
|00001f80| 61 20 63 6f 6d 6d 61 2c | 20 61 73 20 69 6e 20 60 |a comma,| as in `|
|00001f90| 60 4c 69 62 72 61 72 69 | 61 6e 2c 20 74 61 6b 65 |`Librari|an, take|
|00001fa0| 20 74 68 65 0d 0a 62 6f | 6f 6b 20 6f 66 66 20 6f | the..bo|ok off o|
|00001fb0| 66 20 74 68 65 20 73 68 | 65 6c 66 2e 22 0d 0a 0d |f the sh|elf."...|
|00001fc0| 0a 57 68 65 6e 20 70 61 | 72 73 69 6e 67 20 61 20 |.When pa|rsing a |
|00001fd0| 70 6c 61 79 65 72 27 73 | 20 63 6f 6d 6d 61 6e 64 |player's| command|
|00001fe0| 2c 20 74 68 65 20 65 6e | 74 69 72 65 20 73 65 6e |, the en|tire sen|
|00001ff0| 74 65 6e 63 65 20 69 73 | 20 63 6f 6e 76 65 72 74 |tence is| convert|
|00002000| 65 64 20 74 6f 20 6c 6f | 77 65 72 0d 0a 63 61 73 |ed to lo|wer..cas|
|00002010| 65 20 6c 65 74 74 65 72 | 73 20 62 65 66 6f 72 65 |e letter|s before|
|00002020| 20 61 6e 79 74 68 69 6e | 67 20 65 6c 73 65 20 69 | anythin|g else i|
|00002030| 73 20 64 6f 6e 65 2c 20 | 73 6f 20 74 68 65 20 63 |s done, |so the c|
|00002040| 61 73 65 20 6f 66 20 74 | 68 65 20 70 6c 61 79 65 |ase of t|he playe|
|00002050| 72 27 73 20 63 6f 6d 6d | 61 6e 64 0d 0a 64 6f 65 |r's comm|and..doe|
|00002060| 73 6e 27 74 20 6d 61 74 | 74 65 72 2e 20 20 49 6e |sn't mat|ter. In|
|00002070| 20 61 64 64 69 74 69 6f | 6e 2c 20 74 68 65 20 70 | additio|n, the p|
|00002080| 6c 61 79 65 72 20 6e 65 | 65 64 20 6f 6e 6c 79 20 |layer ne|ed only |
|00002090| 74 79 70 65 20 74 68 65 | 20 66 69 72 73 74 20 73 |type the| first s|
|000020a0| 69 78 20 6c 65 74 74 65 | 72 73 0d 0a 6f 66 20 61 |ix lette|rs..of a|
|000020b0| 6e 79 20 77 6f 72 64 3b | 20 69 66 20 68 65 20 63 |ny word;| if he c|
|000020c0| 68 6f 6f 73 65 73 20 74 | 6f 20 74 79 70 65 20 6d |hooses t|o type m|
|000020d0| 6f 72 65 2c 20 74 68 6f | 75 67 68 2c 20 74 68 65 |ore, tho|ugh, the|
|000020e0| 20 65 78 74 72 61 20 6c | 65 74 74 65 72 73 20 61 | extra l|etters a|
|000020f0| 72 65 20 6e 6f 74 0d 0a | 73 69 6d 70 6c 79 20 69 |re not..|simply i|
|00002100| 67 6e 6f 72 65 64 2e 20 | 20 54 68 69 73 20 61 6c |gnored. | This al|
|00002110| 6c 6f 77 73 20 77 6f 72 | 64 73 20 74 68 61 74 20 |lows wor|ds that |
|00002120| 61 72 65 20 6c 6f 6e 67 | 65 72 20 74 68 61 6e 20 |are long|er than |
|00002130| 73 69 78 20 6c 65 74 74 | 65 72 73 20 74 6f 20 62 |six lett|ers to b|
|00002140| 65 0d 0a 61 6d 62 69 67 | 75 6f 75 73 20 77 69 74 |e..ambig|uous wit|
|00002150| 68 20 6f 74 68 65 72 20 | 77 6f 72 64 73 20 69 6e |h other |words in|
|00002160| 20 74 68 65 69 72 20 66 | 69 72 73 74 20 73 69 78 | their f|irst six|
|00002170| 20 6c 65 74 74 65 72 73 | 20 61 6e 64 20 73 74 69 | letters| and sti|
|00002180| 6c 6c 20 62 65 20 63 6f | 72 72 65 63 74 6c 79 0d |ll be co|rrectly.|
|00002190| 0a 69 64 65 6e 74 69 66 | 69 65 64 2e 20 20 54 68 |.identif|ied. Th|
|000021a0| 69 73 20 69 73 20 65 73 | 70 65 63 69 61 6c 6c 79 |is is es|pecially|
|000021b0| 20 75 73 65 66 75 6c 20 | 66 6f 72 20 64 65 61 6c | useful |for deal|
|000021c0| 69 6e 67 20 77 69 74 68 | 20 5e 7b 70 6c 75 72 61 |ing with| ^{plura|
|000021d0| 6c 73 7d 0d 0a 6f 66 20 | 6c 6f 6e 67 20 77 6f 72 |ls}..of |long wor|
|000021e0| 64 73 3b 0d 0a 68 65 6e | 63 65 2c 20 69 66 20 61 |ds;..hen|ce, if a|
|000021f0| 20 70 6c 61 79 65 72 20 | 74 79 70 65 73 20 60 60 | player |types ``|
|00002200| 62 61 72 72 65 6c 22 2c | 20 69 74 20 77 69 6c 6c |barrel",| it will|
|00002210| 20 62 65 20 69 64 65 6e | 74 69 66 69 65 64 20 61 | be iden|tified a|
|00002220| 73 20 60 60 62 61 72 72 | 65 6c 22 20 72 61 74 68 |s ``barr|el" rath|
|00002230| 65 72 0d 0a 74 68 61 6e | 20 60 60 62 61 72 72 65 |er..than| ``barre|
|00002240| 6c 73 22 2e 0d 0a 0d 0a | 4e 61 6d 65 73 20 6f 66 |ls".....|Names of|
|00002250| 20 6f 62 6a 65 63 74 73 | 20 61 72 65 20 6d 61 64 | objects| are mad|
|00002260| 65 20 75 70 20 6f 66 20 | 61 20 6e 6f 75 6e 20 61 |e up of |a noun a|
|00002270| 6e 64 20 6f 6e 65 20 6f | 72 20 6d 6f 72 65 20 5e |nd one o|r more ^|
|00002280| 7b 61 64 6a 65 63 74 69 | 76 65 73 7d 2e 20 20 46 |{adjecti|ves}. F|
|00002290| 6f 72 0d 0a 65 78 61 6d | 70 6c 65 2c 20 60 60 62 |or..exam|ple, ``b|
|000022a0| 6f 6f 6b 2c 22 20 60 60 | 72 65 64 20 62 6f 6f 6b |ook," ``|red book|
|000022b0| 2c 22 20 61 6e 64 20 60 | 60 6c 61 72 67 65 20 72 |," and `|`large r|
|000022c0| 65 64 20 62 6f 6f 6b 22 | 20 6d 69 67 68 74 20 61 |ed book"| might a|
|000022d0| 6c 6c 20 72 65 66 65 72 | 20 74 6f 0d 0a 61 20 70 |ll refer| to..a p|
|000022e0| 61 72 74 69 63 75 6c 61 | 72 20 6f 62 6a 65 63 74 |articula|r object|
|000022f0| 2e 0d 0a 0d 0a 49 6e 20 | 61 64 64 69 74 69 6f 6e |.....In |addition|
|00002300| 2c 20 74 68 65 20 77 6f | 72 64 20 60 60 5e 7b 6f |, the wo|rd ``^{o|
|00002310| 66 7d 22 20 6d 61 79 20 | 63 6f 6e 6e 65 63 74 20 |f}" may |connect |
|00002320| 61 64 64 69 74 69 6f 6e | 61 6c 20 71 75 61 6c 69 |addition|al quali|
|00002330| 66 79 69 6e 67 20 70 68 | 72 61 73 65 73 20 74 6f |fying ph|rases to|
|00002340| 20 61 6e 0d 0a 6f 62 6a | 65 63 74 27 73 20 6e 61 | an..obj|ect's na|
|00002350| 6d 65 2e 20 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |me. For| example|
|00002360| 2c 20 60 60 74 68 65 20 | 6c 61 72 67 65 20 70 69 |, ``the |large pi|
|00002370| 6c 65 20 6f 66 20 79 65 | 6c 6c 6f 77 20 73 74 72 |le of ye|llow str|
|00002380| 61 77 2e 22 0d 0a 49 6e | 74 65 72 6e 61 6c 6c 79 |aw."..In|ternally|
|00002390| 2c 20 77 68 65 6e 20 64 | 65 73 69 67 6e 69 6e 67 |, when d|esigning|
|000023a0| 20 61 20 67 61 6d 65 2c | 20 74 68 65 20 61 64 76 | a game,| the adv|
|000023b0| 65 6e 74 75 72 65 20 77 | 72 69 74 65 72 20 73 69 |enture w|riter si|
|000023c0| 6d 70 6c 79 20 6c 69 73 | 74 73 20 74 68 65 0d 0a |mply lis|ts the..|
|000023d0| 61 64 6a 65 63 74 69 76 | 65 73 20 61 6e 64 20 6e |adjectiv|es and n|
|000023e0| 6f 75 6e 73 20 74 68 61 | 74 20 63 61 6e 20 62 65 |ouns tha|t can be|
|000023f0| 20 75 73 65 64 20 69 6e | 20 72 65 66 65 72 65 6e | used in| referen|
|00002400| 63 65 20 74 6f 20 61 6e | 20 6f 62 6a 65 63 74 2c |ce to an| object,|
|00002410| 20 61 6e 64 20 64 6f 65 | 73 6e 27 74 0d 0a 68 61 | and doe|sn't..ha|
|00002420| 76 65 20 74 6f 20 77 6f | 72 72 79 20 61 62 6f 75 |ve to wo|rry abou|
|00002430| 74 20 70 6c 61 63 65 6d | 65 6e 74 20 6f 66 20 74 |t placem|ent of t|
|00002440| 68 65 20 77 6f 72 64 73 | 2e 20 20 49 6e 20 74 68 |he words|. In th|
|00002450| 65 20 65 78 61 6d 70 6c | 65 20 61 62 6f 76 65 2c |e exampl|e above,|
|00002460| 20 74 68 65 20 70 6c 61 | 79 65 72 0d 0a 77 6f 75 | the pla|yer..wou|
|00002470| 6c 64 20 73 61 79 20 74 | 68 61 74 20 74 68 65 20 |ld say t|hat the |
|00002480| 70 69 6c 65 20 6f 66 20 | 73 74 72 61 77 20 69 73 |pile of |straw is|
|00002490| 20 69 64 65 6e 74 69 66 | 69 65 64 20 62 79 20 74 | identif|ied by t|
|000024a0| 68 65 20 6e 6f 75 6e 73 | 20 60 60 70 69 6c 65 22 |he nouns| ``pile"|
|000024b0| 20 61 6e 64 0d 0a 60 60 | 73 74 72 61 77 22 2c 0d | and..``|straw",.|
|000024c0| 0a 61 6e 64 20 74 68 65 | 20 61 64 6a 65 63 74 69 |.and the| adjecti|
|000024d0| 76 65 73 20 60 60 6c 61 | 72 67 65 22 20 61 6e 64 |ves ``la|rge" and|
|000024e0| 20 60 60 79 65 6c 6c 6f | 77 22 2e 0d 0a 48 65 6e | ``yello|w"...Hen|
|000024f0| 63 65 2c 20 61 6c 6c 20 | 6f 66 20 74 68 65 73 65 |ce, all |of these|
|00002500| 20 70 68 72 61 73 65 73 | 20 61 72 65 20 61 6c 73 | phrases| are als|
|00002510| 6f 0d 0a 72 65 63 6f 67 | 6e 69 7a 65 64 20 61 73 |o..recog|nized as|
|00002520| 20 74 68 65 20 70 69 6c | 65 20 6f 66 20 73 74 72 | the pil|e of str|
|00002530| 61 77 3a 20 20 60 60 73 | 74 72 61 77 2c 22 20 60 |aw: ``s|traw," `|
|00002540| 60 70 69 6c 65 2c 22 20 | 60 60 70 69 6c 65 20 6f |`pile," |``pile o|
|00002550| 66 20 73 74 72 61 77 2c | 22 0d 0a 60 60 6c 61 72 |f straw,|"..``lar|
|00002560| 67 65 20 70 69 6c 65 2c | 22 20 61 6e 64 20 60 60 |ge pile,|" and ``|
|00002570| 79 65 6c 6c 6f 77 20 73 | 74 72 61 77 2e 22 20 20 |yellow s|traw." |
|00002580| 4e 6f 74 65 20 74 68 61 | 74 20 74 68 65 20 75 73 |Note tha|t the us|
|00002590| 65 20 6f 66 20 74 68 65 | 20 77 6f 72 64 20 60 60 |e of the| word ``|
|000025a0| 6f 66 22 0d 0a 69 73 20 | 63 6f 6d 70 6c 65 74 65 |of"..is |complete|
|000025b0| 6c 79 20 74 72 61 6e 73 | 70 61 72 65 6e 74 20 74 |ly trans|parent t|
|000025c0| 6f 20 74 68 65 20 67 61 | 6d 65 20 70 72 6f 67 72 |o the ga|me progr|
|000025d0| 61 6d 3b 20 74 68 65 20 | 70 61 72 73 65 72 20 61 |am; the |parser a|
|000025e0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 0d 0a 72 65 |utomatic|ally..re|
|000025f0| 6d 6f 76 65 73 20 74 68 | 65 20 60 60 6f 66 22 20 |moves th|e ``of" |
|00002600| 61 6e 64 20 72 65 61 72 | 72 61 6e 67 65 73 20 74 |and rear|ranges t|
|00002610| 68 65 20 77 6f 72 64 73 | 20 61 70 70 72 6f 70 72 |he words| appropr|
|00002620| 69 61 74 65 6c 79 2e 0d | 0a 0d 0a 4f 6e 65 20 6d |iately..|...One m|
|00002630| 6f 72 65 20 73 70 65 63 | 69 61 6c 20 63 61 73 65 |ore spec|ial case|
|00002640| 20 6f 63 63 75 72 73 20 | 77 68 65 6e 20 5e 7b 6e | occurs |when ^{n|
|00002650| 75 6d 62 65 72 73 7d 20 | 61 72 65 20 75 73 65 64 |umbers} |are used|
|00002660| 20 61 73 20 61 64 6a 65 | 63 74 69 76 65 73 2e 20 | as adje|ctives. |
|00002670| 49 6e 0d 0a 64 65 66 69 | 6e 69 6e 67 20 61 6e 20 |In..defi|ning an |
|00002680| 6f 62 6a 65 63 74 27 73 | 20 61 64 6a 65 63 74 69 |object's| adjecti|
|00002690| 76 65 73 2c 20 69 66 20 | 79 6f 75 20 77 61 6e 74 |ves, if |you want|
|000026a0| 20 61 20 6e 75 6d 62 65 | 72 20 74 6f 20 62 65 20 | a numbe|r to be |
|000026b0| 75 73 65 64 20 61 73 20 | 61 6e 0d 0a 61 64 6a 65 |used as |an..adje|
|000026c0| 63 74 69 76 65 2c 20 73 | 69 6d 70 6c 79 20 69 6e |ctive, s|imply in|
|000026d0| 63 6c 75 64 65 20 69 74 | 20 69 6e 20 74 68 65 20 |clude it| in the |
|000026e0| 7b 5c 74 74 20 61 64 6a | 65 63 74 69 76 65 7d 20 |{\tt adj|ective} |
|000026f0| 6c 69 73 74 20 69 6e 20 | 73 69 6e 67 6c 65 20 71 |list in |single q|
|00002700| 75 6f 74 65 73 0d 0a 6a | 75 73 74 20 6c 69 6b 65 |uotes..j|ust like|
|00002710| 20 61 6e 79 20 6f 74 68 | 65 72 20 61 64 6a 65 63 | any oth|er adjec|
|00002720| 74 69 76 65 2e 20 20 57 | 68 65 6e 20 74 68 65 20 |tive. W|hen the |
|00002730| 70 6c 61 79 65 72 20 69 | 73 20 74 79 70 69 6e 67 |player i|s typing|
|00002740| 20 63 6f 6d 6d 61 6e 64 | 73 2c 20 68 6f 77 65 76 | command|s, howev|
|00002750| 65 72 2c 0d 0a 69 74 20 | 69 73 20 68 61 6e 64 6c |er,..it |is handl|
|00002760| 65 64 20 61 20 6c 69 74 | 74 6c 65 20 64 69 66 66 |ed a lit|tle diff|
|00002770| 65 72 65 6e 74 6c 79 20 | 74 68 61 6e 20 6f 74 68 |erently |than oth|
|00002780| 65 72 20 61 64 6a 65 63 | 74 69 76 65 73 3a 20 20 |er adjec|tives: |
|00002790| 74 68 65 20 6e 75 6d 62 | 65 72 20 63 61 6e 0d 0a |the numb|er can..|
|000027a0| 7b 5c 69 74 20 66 6f 6c | 6c 6f 77 7d 20 74 68 65 |{\it fol|low} the|
|000027b0| 20 6e 6f 75 6e 2e 20 20 | 54 68 69 73 20 69 73 20 | noun. |This is |
|000027c0| 75 73 65 66 75 6c 20 69 | 6e 20 63 61 73 65 73 20 |useful i|n cases |
|000027d0| 77 69 74 68 20 6e 75 6d | 62 65 72 65 64 20 69 74 |with num|bered it|
|000027e0| 65 6d 73 2c 20 73 69 6e | 63 65 0d 0a 69 74 27 73 |ems, sin|ce..it's|
|000027f0| 20 6d 6f 72 65 20 6e 61 | 74 75 72 61 6c 20 74 6f | more na|tural to|
|00002800| 20 70 6c 61 63 65 20 74 | 68 65 20 6e 75 6d 62 65 | place t|he numbe|
|00002810| 72 20 61 66 74 65 72 20 | 74 68 65 20 6e 6f 75 6e |r after |the noun|
|00002820| 2e 20 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |. For e|xample, |
|00002830| 65 6c 65 76 61 74 6f 72 | 0d 0a 62 75 74 74 6f 6e |elevator|..button|
|00002840| 73 20 77 6f 75 6c 64 20 | 62 65 20 63 61 6c 6c 65 |s would |be calle|
|00002850| 64 20 60 60 62 75 74 74 | 6f 6e 20 31 2c 22 20 60 |d ``butt|on 1," `|
|00002860| 60 62 75 74 74 6f 6e 20 | 32 2c 22 20 61 6e 64 20 |`button |2," and |
|00002870| 73 6f 20 66 6f 72 74 68 | 2e 20 20 28 4f 66 20 63 |so forth|. (Of c|
|00002880| 6f 75 72 73 65 2c 0d 0a | 72 65 66 65 72 72 69 6e |ourse,..|referrin|
|00002890| 67 20 74 6f 20 74 68 65 | 6d 20 61 73 20 60 60 31 |g to the|m as ``1|
|000028a0| 20 62 75 74 74 6f 6e 2c | 22 20 60 60 32 20 62 75 | button,|" ``2 bu|
|000028b0| 74 74 6f 6e 2c 22 20 61 | 6e 64 20 73 6f 20 6f 6e |tton," a|nd so on|
|000028c0| 2c 20 69 73 20 61 63 63 | 65 70 74 65 64 20 61 73 |, is acc|epted as|
|000028d0| 0d 0a 77 65 6c 6c 2c 20 | 62 75 74 20 69 74 27 73 |..well, |but it's|
|000028e0| 20 73 6f 6d 65 77 68 61 | 74 20 61 6d 62 69 67 75 | somewha|t ambigu|
|000028f0| 6f 75 73 2c 20 69 6e 20 | 74 68 61 74 20 69 74 20 |ous, in |that it |
|00002900| 73 6f 75 6e 64 73 20 6c | 69 6b 65 20 61 20 6e 75 |sounds l|ike a nu|
|00002910| 6d 62 65 72 20 6f 66 20 | 62 75 74 74 6f 6e 73 0d |mber of |buttons.|
|00002920| 0a 72 61 74 68 65 72 20 | 74 68 61 6e 20 74 68 65 |.rather |than the|
|00002930| 20 6e 75 6d 62 65 72 20 | 6f 66 20 74 68 65 20 62 | number |of the b|
|00002940| 75 74 74 6f 6e 2e 29 20 | 20 41 73 20 77 69 74 68 |utton.) | As with|
|00002950| 20 60 60 6f 66 2c 22 20 | 74 68 69 73 20 73 70 65 | ``of," |this spe|
|00002960| 63 69 61 6c 20 63 61 73 | 65 20 69 73 0d 0a 74 72 |cial cas|e is..tr|
|00002970| 61 6e 73 70 61 72 65 6e | 74 20 74 6f 20 74 68 65 |ansparen|t to the|
|00002980| 20 67 61 6d 65 20 70 72 | 6f 67 72 61 6d 2c 20 73 | game pr|ogram, s|
|00002990| 69 6e 63 65 20 6f 6e 6c | 79 20 74 68 65 20 70 61 |ince onl|y the pa|
|000029a0| 72 73 65 72 20 6e 65 65 | 64 73 20 74 6f 20 77 6f |rser nee|ds to wo|
|000029b0| 72 72 79 20 61 62 6f 75 | 74 0d 0a 74 68 65 20 6f |rry abou|t..the o|
|000029c0| 72 64 65 72 20 6f 66 20 | 74 68 65 20 77 6f 72 64 |rder of |the word|
|000029d0| 73 20 72 65 66 65 72 72 | 69 6e 67 20 74 6f 20 61 |s referr|ing to a|
|000029e0| 6e 20 6f 62 6a 65 63 74 | 2e 0d 0a 0d 0a 53 6f 6d |n object|.....Som|
|000029f0| 65 74 69 6d 65 73 2c 20 | 74 68 65 72 65 20 77 69 |etimes, |there wi|
|00002a00| 6c 6c 20 62 65 20 5e 7b | 61 6d 62 69 67 75 6f 75 |ll be ^{|ambiguou|
|00002a10| 73 20 6f 62 6a 65 63 74 | 73 7d 3b 0d 0a 66 6f 72 |s object|s};..for|
|00002a20| 20 65 78 61 6d 70 6c 65 | 2c 20 61 20 72 65 64 20 | example|, a red |
|00002a30| 62 6f 6f 6b 20 61 6e 64 | 20 61 20 62 6c 75 65 0d |book and| a blue.|
|00002a40| 0a 62 6f 6f 6b 2e 20 20 | 49 66 20 74 68 65 20 70 |.book. |If the p|
|00002a50| 6c 61 79 65 72 20 74 79 | 70 65 73 20 73 69 6d 70 |layer ty|pes simp|
|00002a60| 6c 79 20 60 60 62 6f 6f | 6b 22 2c 20 74 68 65 20 |ly ``boo|k", the |
|00002a70| 70 61 72 73 65 72 20 77 | 69 6c 6c 20 74 72 79 20 |parser w|ill try |
|00002a80| 69 74 73 20 62 65 73 74 | 20 74 6f 0d 0a 66 69 67 |its best| to..fig|
|00002a90| 75 72 65 20 6f 75 74 20 | 77 68 69 63 68 20 62 6f |ure out |which bo|
|00002aa0| 6f 6b 20 74 68 65 20 70 | 6c 61 79 65 72 20 6d 65 |ok the p|layer me|
|00002ab0| 61 6e 73 2e 20 20 46 69 | 72 73 74 2c 20 69 74 20 |ans. Fi|rst, it |
|00002ac0| 77 69 6c 6c 20 61 74 74 | 65 6d 70 74 20 74 6f 20 |will att|empt to |
|00002ad0| 69 64 65 6e 74 69 66 79 | 0d 0a 61 6c 6c 20 74 68 |identify|..all th|
|00002ae0| 65 20 6e 6f 75 6e 73 20 | 74 68 61 74 20 61 72 65 |e nouns |that are|
|00002af0| 20 6d 65 61 6e 69 6e 67 | 66 75 6c 20 77 69 74 68 | meaning|ful with|
|00002b00| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 20 74 68 65 | the com|mand the|
|00002b10| 20 70 6c 61 79 65 72 20 | 69 73 20 74 72 79 69 6e | player |is tryin|
|00002b20| 67 20 74 6f 0d 0a 69 73 | 73 75 65 2c 20 77 68 69 |g to..is|sue, whi|
|00002b30| 63 68 20 66 72 65 71 75 | 65 6e 74 6c 79 20 6e 61 |ch frequ|ently na|
|00002b40| 72 72 6f 77 73 20 69 74 | 20 64 6f 77 6e 20 65 6e |rrows it| down en|
|00002b50| 6f 75 67 68 20 74 68 61 | 74 20 6e 6f 20 66 75 72 |ough tha|t no fur|
|00002b60| 74 68 65 72 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |ther inf|ormation|
|00002b70| 20 69 73 0d 0a 72 65 71 | 75 69 72 65 64 2e 20 20 | is..req|uired. |
|00002b80| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 73 75 70 |For exam|ple, sup|
|00002b90| 70 6f 73 65 20 74 68 65 | 20 70 6c 61 79 65 72 20 |pose the| player |
|00002ba0| 69 73 20 63 61 72 72 79 | 69 6e 67 20 74 68 65 20 |is carry|ing the |
|00002bb0| 62 6c 75 65 20 62 6f 6f | 6b 2c 20 61 6e 64 20 74 |blue boo|k, and t|
|00002bc0| 68 65 0d 0a 72 65 64 20 | 62 6f 6f 6b 20 69 73 20 |he..red |book is |
|00002bd0| 69 6e 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 72 |in the c|urrent r|
|00002be0| 6f 6f 6d 3b 20 74 68 65 | 20 70 61 72 73 65 72 20 |oom; the| parser |
|00002bf0| 77 69 6c 6c 20 6b 6e 6f | 77 20 74 68 61 74 20 60 |will kno|w that `|
|00002c00| 60 74 61 6b 65 20 74 68 | 65 20 62 6f 6f 6b 22 0d |`take th|e book".|
|00002c10| 0a 72 65 66 65 72 73 20 | 74 6f 20 74 68 65 20 72 |.refers |to the r|
|00002c20| 65 64 20 62 6f 6f 6b 2c | 20 62 65 63 61 75 73 65 |ed book,| because|
|00002c30| 20 74 68 65 20 62 6c 75 | 65 20 62 6f 6f 6b 20 64 | the blu|e book d|
|00002c40| 6f 65 73 6e 27 74 20 6d | 61 6b 65 20 73 65 6e 73 |oesn't m|ake sens|
|00002c50| 65 20 77 69 74 68 20 74 | 68 65 0d 0a 74 61 6b 65 |e with t|he..take|
|00002c60| 20 63 6f 6d 6d 61 6e 64 | 2e 20 20 48 6f 77 65 76 | command|. Howev|
|00002c70| 65 72 2c 20 69 66 20 62 | 6f 74 68 20 62 6f 6f 6b |er, if b|oth book|
|00002c80| 73 20 61 72 65 20 69 6e | 20 74 68 65 20 72 6f 6f |s are in| the roo|
|00002c90| 6d 2c 20 74 68 65 20 70 | 61 72 73 65 72 20 77 6f |m, the p|arser wo|
|00002ca0| 6e 27 74 20 6b 6e 6f 77 | 0d 0a 77 68 61 74 20 74 |n't know|..what t|
|00002cb0| 6f 20 64 6f 2c 20 73 6f | 20 69 74 20 77 69 6c 6c |o do, so| it will|
|00002cc0| 20 61 73 6b 3a 0d 0a 0d | 0a 7b 5c 65 78 61 6d 70 | ask:...|.{\examp|
|00002cd0| 6c 65 0d 0a 20 20 20 20 | 57 68 69 63 68 20 62 6f |le.. |Which bo|
|00002ce0| 6f 6b 20 64 6f 20 79 6f | 75 20 6d 65 61 6e 2c 20 |ok do yo|u mean, |
|00002cf0| 74 68 65 20 72 65 64 20 | 62 6f 6f 6b 2c 20 6f 72 |the red |book, or|
|00002d00| 20 74 68 65 20 62 6c 75 | 65 20 62 6f 6f 6b 3f 0d | the blu|e book?.|
|00002d10| 0a 5c 6d 65 64 73 6b 69 | 70 7d 0d 0a 0d 0a 41 74 |.\medski|p}....At|
|00002d20| 20 74 68 69 73 20 70 6f | 69 6e 74 2c 20 74 68 65 | this po|int, the|
|00002d30| 20 70 6c 61 79 65 72 20 | 63 61 6e 20 61 6e 73 77 | player |can answ|
|00002d40| 65 72 20 60 60 72 65 64 | 22 20 6f 72 20 60 60 62 |er ``red|" or ``b|
|00002d50| 6c 75 65 2c 22 20 6f 72 | 20 60 60 74 68 65 20 72 |lue," or| ``the r|
|00002d60| 65 64 20 62 6f 6f 6b 2c | 22 0d 0a 6f 72 20 65 76 |ed book,|"..or ev|
|00002d70| 65 6e 20 60 60 74 68 65 | 20 62 6c 75 65 20 6f 6e |en ``the| blue on|
|00002d80| 65 2c 22 0d 0a 69 6e 20 | 77 68 69 63 68 20 63 61 |e,"..in |which ca|
|00002d90| 73 65 20 74 68 65 20 70 | 61 72 73 65 72 20 77 69 |se the p|arser wi|
|00002da0| 6c 6c 20 63 6f 6d 70 6c | 65 74 65 20 74 68 65 20 |ll compl|ete the |
|00002db0| 63 6f 6d 6d 61 6e 64 2e | 20 20 48 65 20 63 61 6e |command.| He can|
|00002dc0| 0d 0a 61 6c 73 6f 20 73 | 61 79 20 60 60 62 6f 74 |..also s|ay ``bot|
|00002dd0| 68 22 20 6f 72 20 60 60 | 61 6c 6c 2c 22 20 6f 72 |h" or ``|all," or|
|00002de0| 20 65 76 65 6e 20 60 60 | 74 68 65 20 72 65 64 20 | even ``|the red |
|00002df0| 6f 6e 65 20 61 6e 64 20 | 74 68 65 20 62 6c 75 65 |one and |the blue|
|00002e00| 20 6f 6e 65 2c 22 20 61 | 6e 64 20 74 68 65 0d 0a | one," a|nd the..|
|00002e10| 70 61 72 73 65 72 20 77 | 69 6c 6c 20 74 61 6b 65 |parser w|ill take|
|00002e20| 20 62 6f 74 68 20 62 6f | 6f 6b 73 2e 20 20 4e 6f | both bo|oks. No|
|00002e30| 77 2c 20 74 68 65 20 70 | 6c 61 79 65 72 20 63 6f |w, the p|layer co|
|00002e40| 75 6c 64 20 68 61 76 65 | 20 73 61 69 64 20 74 68 |uld have| said th|
|00002e50| 69 73 20 69 6e 20 74 68 | 65 0d 0a 66 69 72 73 74 |is in th|e..first|
|00002e60| 20 70 6c 61 63 65 2c 20 | 61 73 73 75 6d 69 6e 67 | place, |assuming|
|00002e70| 20 74 68 65 20 77 72 69 | 74 65 72 20 70 72 6f 76 | the wri|ter prov|
|00002e80| 69 64 65 64 20 61 20 70 | 6c 75 72 61 6c 3a 20 20 |ided a p|lural: |
|00002e90| 60 60 74 61 6b 65 20 74 | 68 65 20 62 6f 6f 6b 73 |``take t|he books|
|00002ea0| 2e 22 0d 0a 20 20 20 20 | 0d 0a 54 68 69 73 20 62 |.".. |..This b|
|00002eb0| 72 69 6e 67 73 20 75 73 | 20 74 6f 20 74 68 65 20 |rings us| to the |
|00002ec0| 73 75 62 6a 65 63 74 20 | 6f 66 20 5e 7b 6d 75 6c |subject |of ^{mul|
|00002ed0| 74 69 70 6c 65 20 64 69 | 72 65 63 74 20 6f 62 6a |tiple di|rect obj|
|00002ee0| 65 63 74 73 7d 2e 20 20 | 54 68 65 20 70 6c 61 79 |ects}. |The play|
|00002ef0| 65 72 20 63 61 6e 0d 0a | 6c 69 73 74 20 73 65 76 |er can..|list sev|
|00002f00| 65 72 61 6c 20 6f 62 6a | 65 63 74 73 20 68 65 20 |eral obj|ects he |
|00002f10| 77 61 6e 74 73 20 74 6f | 20 74 61 6b 65 2c 20 6f |wants to| take, o|
|00002f20| 72 20 70 65 72 66 6f 72 | 6d 20 61 6e 6f 74 68 65 |r perfor|m anothe|
|00002f30| 72 20 61 63 74 69 6f 6e | 20 6f 6e 2c 20 73 69 6d |r action| on, sim|
|00002f40| 70 6c 79 0d 0a 62 79 20 | 75 73 69 6e 67 20 61 20 |ply..by |using a |
|00002f50| 63 6f 6d 6d 61 20 62 65 | 74 77 65 65 6e 20 6f 62 |comma be|tween ob|
|00002f60| 6a 65 63 74 73 3a 20 20 | 60 60 54 61 6b 65 20 74 |jects: |``Take t|
|00002f70| 68 65 20 72 65 64 20 62 | 6f 6f 6b 2c 20 74 68 65 |he red b|ook, the|
|00002f80| 20 62 6f 78 2c 20 61 6e | 64 20 74 68 65 20 0d 0a | box, an|d the ..|
|00002f90| 6c 61 6d 70 20 6f 66 66 | 20 74 68 65 20 73 68 65 |lamp off| the she|
|00002fa0| 6c 66 2e 22 0d 0a 0d 0a | 48 65 20 63 61 6e 20 61 |lf."....|He can a|
|00002fb0| 6c 73 6f 20 61 62 62 72 | 65 76 69 61 74 65 20 74 |lso abbr|eviate t|
|00002fc0| 68 69 73 20 74 6f 20 73 | 6f 6d 65 20 65 78 74 65 |his to s|ome exte|
|00002fd0| 6e 74 20 77 69 74 68 20 | 74 68 65 20 77 6f 72 64 |nt with |the word|
|00002fe0| 73 20 60 60 5e 7b 65 76 | 65 72 79 74 68 69 6e 67 |s ``^{ev|erything|
|00002ff0| 7d 22 0d 0a 61 6e 64 20 | 60 60 5e 7b 61 6c 6c 7d |}"..and |``^{all}|
|00003000| 22 20 28 77 68 69 63 68 | 20 61 72 65 20 73 79 6e |" (which| are syn|
|00003010| 6f 6e 79 6d 6f 75 73 29 | 3b 20 66 6f 72 20 65 78 |onymous)|; for ex|
|00003020| 61 6d 70 6c 65 2c 20 60 | 60 54 61 6b 65 20 65 76 |ample, `|`Take ev|
|00003030| 65 72 79 74 68 69 6e 67 | 20 6f 66 66 0d 0a 74 68 |erything| off..th|
|00003040| 65 20 73 68 65 6c 66 2c | 22 20 6f 72 20 60 60 64 |e shelf,|" or ``d|
|00003050| 72 6f 70 20 61 6c 6c 2e | 22 0d 0a 49 66 20 68 65 |rop all.|"..If he|
|00003060| 20 77 61 6e 74 73 20 74 | 6f 20 62 65 20 61 20 6c | wants t|o be a l|
|00003070| 69 74 74 6c 65 20 6d 6f | 72 65 20 73 70 65 63 69 |ittle mo|re speci|
|00003080| 66 69 63 2c 20 68 65 20 | 63 61 6e 20 64 6f 20 73 |fic, he |can do s|
|00003090| 6f 6d 65 74 68 69 6e 67 | 20 6c 69 6b 65 20 74 68 |omething| like th|
|000030a0| 69 73 3a 0d 0a 60 60 44 | 72 6f 70 20 65 76 65 72 |is:..``D|rop ever|
|000030b0| 79 74 68 69 6e 67 20 65 | 78 63 65 70 74 20 74 68 |ything e|xcept th|
|000030c0| 65 20 6b 65 79 73 20 6f | 6e 20 74 68 65 20 64 65 |e keys o|n the de|
|000030d0| 73 6b 2c 22 20 6f 72 0d | 0a 60 60 54 61 6b 65 20 |sk," or.|.``Take |
|000030e0| 61 6c 6c 20 62 75 74 20 | 74 68 65 20 72 75 73 74 |all but |the rust|
|000030f0| 79 20 6b 6e 69 66 65 2c | 20 74 68 65 20 75 73 65 |y knife,| the use|
|00003100| 6c 65 73 73 20 6c 61 6e | 74 65 72 6e 2c 20 61 6e |less lan|tern, an|
|00003110| 64 20 74 68 65 20 73 6b | 65 6c 65 74 6f 6e 2e 22 |d the sk|eleton."|
|00003120| 0d 0a 0d 0a 46 72 6f 6d | 20 74 68 65 20 61 64 76 |....From| the adv|
|00003130| 65 6e 74 75 72 65 20 77 | 72 69 74 65 72 27 73 20 |enture w|riter's |
|00003140| 73 74 61 6e 64 70 6f 69 | 6e 74 2c 20 74 68 65 72 |standpoi|nt, ther|
|00003150| 65 27 73 20 6e 6f 20 6d | 6f 72 65 20 77 6f 72 6b |e's no m|ore work|
|00003160| 20 74 6f 20 62 65 20 64 | 6f 6e 65 20 77 68 65 6e | to be d|one when|
|00003170| 0d 0a 74 68 65 20 70 6c | 61 79 65 72 20 75 73 65 |..the pl|ayer use|
|00003180| 73 20 6d 75 6c 74 69 70 | 6c 65 20 64 69 72 65 63 |s multip|le direc|
|00003190| 74 20 6f 62 6a 65 63 74 | 73 2c 20 62 65 63 61 75 |t object|s, becau|
|000031a0| 73 65 20 74 68 65 20 70 | 61 72 73 65 72 20 62 72 |se the p|arser br|
|000031b0| 65 61 6b 73 20 75 70 20 | 74 68 65 0d 0a 63 6f 6d |eaks up |the..com|
|000031c0| 6d 61 6e 64 20 69 6e 74 | 6f 20 73 69 6d 70 6c 65 |mand int|o simple|
|000031d0| 72 20 63 6f 6d 6d 61 6e | 64 73 2e 20 20 46 6f 72 |r comman|ds. For|
|000031e0| 20 65 78 61 6d 70 6c 65 | 2c 20 69 66 20 74 68 65 | example|, if the|
|000031f0| 20 70 6c 61 79 65 72 20 | 74 79 70 65 73 2c 0d 0a | player |types,..|
|00003200| 60 60 54 61 6b 65 20 74 | 68 65 20 72 65 64 20 62 |``Take t|he red b|
|00003210| 6f 6f 6b 2c 20 74 68 65 | 20 62 6c 75 65 20 62 6f |ook, the| blue bo|
|00003220| 6f 6b 2c 20 61 6e 64 20 | 74 68 65 20 6e 61 73 74 |ok, and |the nast|
|00003230| 79 20 6b 6e 69 66 65 2c | 22 0d 0a 74 68 65 20 70 |y knife,|"..the p|
|00003240| 61 72 73 65 72 20 70 72 | 65 2d 64 69 67 65 73 74 |arser pr|e-digest|
|00003250| 73 20 74 68 69 73 2c 20 | 73 6f 20 74 68 65 20 67 |s this, |so the g|
|00003260| 61 6d 65 20 73 65 65 73 | 20 74 68 72 65 65 20 73 |ame sees| three s|
|00003270| 65 70 61 72 61 74 65 20 | 63 6f 6d 6d 61 6e 64 73 |eparate |commands|
|00003280| 3a 0d 0a 60 60 54 61 6b | 65 20 74 68 65 20 72 65 |:..``Tak|e the re|
|00003290| 64 20 62 6f 6f 6b 2c 22 | 20 74 68 65 6e 20 60 60 |d book,"| then ``|
|000032a0| 74 61 6b 65 20 74 68 65 | 20 62 6c 75 65 20 62 6f |take the| blue bo|
|000032b0| 6f 6b 2c 22 20 61 6e 64 | 20 74 68 65 6e 0d 0a 60 |ok," and| then..`|
|000032c0| 60 74 61 6b 65 20 74 68 | 65 20 6e 61 73 74 79 20 |`take th|e nasty |
|000032d0| 6b 6e 69 66 65 2e 22 0d | 0a 28 49 6e 20 66 61 63 |knife.".|.(In fac|
|000032e0| 74 2c 20 74 68 65 20 67 | 61 6d 65 20 73 65 65 73 |t, the g|ame sees|
|000032f0| 20 61 6e 20 65 76 65 6e | 20 73 69 6d 70 6c 65 72 | an even| simpler|
|00003300| 20 72 65 70 72 65 73 65 | 6e 74 61 74 69 6f 6e 2c | represe|ntation,|
|00003310| 20 62 65 63 61 75 73 65 | 20 74 68 65 20 70 61 72 | because| the par|
|00003320| 73 65 72 0d 0a 64 6f 65 | 73 20 65 76 65 6e 20 6d |ser..doe|s even m|
|00003330| 6f 72 65 20 77 6f 72 6b | 20 74 68 61 6e 20 74 68 |ore work| than th|
|00003340| 69 73 2e 20 20 54 68 65 | 20 66 69 6e 61 6c 20 64 |is. The| final d|
|00003350| 69 67 65 73 74 65 64 20 | 66 6f 72 6d 20 6f 66 20 |igested |form of |
|00003360| 61 20 63 6f 6d 6d 61 6e | 64 20 69 73 0d 0a 64 69 |a comman|d is..di|
|00003370| 73 63 75 73 73 65 64 20 | 6c 61 74 65 72 2e 29 0d |scussed |later.).|
|00003380| 0a 0d 0a 4e 6f 74 65 20 | 74 68 61 74 20 77 65 27 |...Note |that we'|
|00003390| 76 65 20 65 6e 64 65 64 | 20 74 68 65 20 6c 61 73 |ve ended| the las|
|000033a0| 74 20 66 65 77 20 63 6f | 6d 6d 61 6e 64 73 20 77 |t few co|mmands w|
|000033b0| 69 74 68 20 61 20 70 65 | 72 69 6f 64 2e 0d 0a 54 |ith a pe|riod...T|
|000033c0| 68 69 73 20 69 73 20 6f | 70 74 69 6f 6e 61 6c 2c |his is o|ptional,|
|000033d0| 0d 0a 62 75 74 20 69 74 | 20 64 6f 65 73 20 74 65 |..but it| does te|
|000033e0| 6c 6c 20 74 68 65 20 70 | 61 72 73 65 72 20 74 68 |ll the p|arser th|
|000033f0| 61 74 20 74 68 65 20 73 | 65 6e 74 65 6e 63 65 20 |at the s|entence |
|00003400| 69 73 20 66 69 6e 69 73 | 68 65 64 2c 20 77 68 69 |is finis|hed, whi|
|00003410| 63 68 20 63 61 6e 20 62 | 65 20 75 73 65 66 75 6c |ch can b|e useful|
|00003420| 0d 0a 69 66 20 74 68 65 | 20 70 6c 61 79 65 72 20 |..if the| player |
|00003430| 77 61 6e 74 73 20 74 6f | 20 70 75 74 20 73 65 76 |wants to| put sev|
|00003440| 65 72 61 6c 20 73 65 6e | 74 65 6e 63 65 73 20 69 |eral sen|tences i|
|00003450| 6e 74 6f 20 61 20 73 69 | 6e 67 6c 65 20 63 6f 6d |nto a si|ngle com|
|00003460| 6d 61 6e 64 3a 0d 0a 0d | 0a 7b 5c 65 78 61 6d 70 |mand:...|.{\examp|
|00003470| 6c 65 0d 0a 20 20 20 20 | 54 61 6b 65 20 65 76 65 |le.. |Take eve|
|00003480| 72 79 74 68 69 6e 67 3b | 20 67 6f 20 65 61 73 74 |rything;| go east|
|00003490| 2c 20 74 68 65 6e 20 74 | 61 6b 65 20 74 68 65 20 |, then t|ake the |
|000034a0| 6c 61 6d 70 20 61 6e 64 | 20 6c 6f 6f 6b 20 61 74 |lamp and| look at|
|000034b0| 20 69 74 21 0d 0a 5c 6d | 65 64 73 6b 69 70 7d 0d | it!..\m|edskip}.|
|000034c0| 0a 0d 0a 5e 7b 53 65 6d | 69 63 6f 6c 6f 6e 73 7d |...^{Sem|icolons}|
|000034d0| 2c 20 5e 7b 65 78 63 6c | 61 6d 61 74 69 6f 6e 20 |, ^{excl|amation |
|000034e0| 6d 61 72 6b 73 7d 2c 20 | 5e 7b 70 65 72 69 6f 64 |marks}, |^{period|
|000034f0| 73 7d 2c 20 5e 7b 71 75 | 65 73 74 69 6f 6e 20 6d |s}, ^{qu|estion m|
|00003500| 61 72 6b 73 7d 2c 0d 0a | 61 6e 64 20 74 68 65 20 |arks},..|and the |
|00003510| 77 6f 72 64 20 60 60 5e | 7b 74 68 65 6e 7d 22 0d |word ``^|{then}".|
|00003520| 0a 61 6c 6c 20 6d 65 61 | 6e 20 74 68 65 20 73 61 |.all mea|n the sa|
|00003530| 6d 65 20 74 68 69 6e 67 | 3a 20 20 74 68 65 20 73 |me thing|: the s|
|00003540| 65 6e 74 65 6e 63 65 20 | 69 73 20 66 69 6e 69 73 |entence |is finis|
|00003550| 68 65 64 2e 0d 0a 5e 7b | 43 6f 6d 6d 61 73 7d 20 |hed...^{|Commas} |
|00003560| 61 6e 64 20 74 68 65 20 | 77 6f 72 64 20 60 60 5e |and the |word ``^|
|00003570| 7b 61 6e 64 7d 2c 22 0d | 0a 69 6e 20 61 64 64 69 |{and},".|.in addi|
|00003580| 74 69 6f 6e 20 74 6f 20 | 62 65 69 6e 67 20 75 73 |tion to |being us|
|00003590| 65 66 75 6c 20 66 6f 72 | 20 6c 69 73 74 69 6e 67 |eful for| listing|
|000035a0| 20 6f 62 6a 65 63 74 73 | 20 74 6f 20 61 20 73 69 | objects| to a si|
|000035b0| 6e 67 6c 65 20 63 6f 6d | 6d 61 6e 64 2c 20 63 61 |ngle com|mand, ca|
|000035c0| 6e 20 62 65 0d 0a 75 73 | 65 64 20 74 6f 20 73 65 |n be..us|ed to se|
|000035d0| 70 61 72 61 74 65 20 63 | 6f 6d 6d 61 6e 64 73 20 |parate c|ommands |
|000035e0| 61 73 20 77 65 6c 6c 2c | 20 73 6f 20 6c 6f 6e 67 |as well,| so long|
|000035f0| 20 61 73 20 74 68 65 20 | 77 6f 72 64 73 20 74 68 | as the |words th|
|00003600| 61 74 20 66 6f 6c 6c 6f | 77 20 74 68 65 20 63 6f |at follo|w the co|
|00003610| 6d 6d 61 0d 0a 6f 72 20 | 60 60 61 6e 64 22 20 63 |mma..or |``and" c|
|00003620| 61 6e 27 74 20 62 65 20 | 69 6e 74 65 72 70 72 65 |an't be |interpre|
|00003630| 74 65 64 20 61 73 20 61 | 6e 6f 74 68 65 72 20 6f |ted as a|nother o|
|00003640| 62 6a 65 63 74 2e 0d 0a | 0d 0a 54 68 69 73 20 61 |bject...|..This a|
|00003650| 6c 73 6f 20 62 72 69 6e | 67 73 20 75 70 20 60 60 |lso brin|gs up ``|
|00003660| 5e 7b 69 74 7d 2c 22 20 | 61 6e 64 20 69 74 73 20 |^{it}," |and its |
|00003670| 70 61 72 74 6e 65 72 20 | 60 60 5e 7b 74 68 65 6d |partner |``^{them|
|00003680| 7d 2e 22 0d 0a 54 68 65 | 73 65 20 77 6f 72 64 73 |}."..The|se words|
|00003690| 20 63 61 6e 20 62 65 20 | 75 73 65 64 20 74 6f 0d | can be |used to.|
|000036a0| 0a 72 65 66 65 72 20 74 | 6f 20 74 68 65 20 6c 61 |.refer t|o the la|
|000036b0| 73 74 20 64 69 72 65 63 | 74 20 6f 62 6a 65 63 74 |st direc|t object|
|000036c0| 2c 20 6f 72 2c 20 69 6e | 20 73 6f 6d 65 20 63 61 |, or, in| some ca|
|000036d0| 73 65 73 2c 20 61 6e 20 | 6f 62 6a 65 63 74 20 74 |ses, an |object t|
|000036e0| 68 61 74 20 74 68 65 20 | 67 61 6d 65 0d 0a 72 65 |hat the |game..re|
|000036f0| 66 65 72 72 65 64 20 74 | 6f 20 69 6e 20 69 74 73 |ferred t|o in its|
|00003700| 20 64 65 73 63 72 69 70 | 74 69 6f 6e 20 6f 66 20 | descrip|tion of |
|00003710| 61 20 70 6c 61 63 65 20 | 6f 72 20 65 76 65 6e 74 |a place |or event|
|00003720| 2e 20 20 28 54 68 65 20 | 62 75 69 6c 74 2d 69 6e |. (The |built-in|
|00003730| 20 66 75 6e 63 74 69 6f | 6e 0d 0a 7b 5c 74 74 20 | functio|n..{\tt |
|00003740| 73 65 74 69 74 28 29 7d | 0d 0a 63 61 6e 20 62 65 |setit()}|..can be|
|00003750| 20 75 73 65 64 20 62 79 | 20 74 68 65 20 61 64 76 | used by| the adv|
|00003760| 65 6e 74 75 72 65 20 77 | 72 69 74 65 72 20 74 6f |enture w|riter to|
|00003770| 20 64 65 66 69 6e 65 20 | 77 68 61 74 20 60 60 69 | define |what ``i|
|00003780| 74 22 20 6d 65 61 6e 73 | 20 69 6e 20 74 68 65 0d |t" means| in the.|
|00003790| 0a 6e 65 78 74 20 63 6f | 6d 6d 61 6e 64 2e 29 20 |.next co|mmand.) |
|000037a0| 20 60 60 54 68 65 6d 22 | 20 77 6f 72 6b 73 20 6c | ``Them"| works l|
|000037b0| 69 6b 65 20 60 60 69 74 | 2c 22 0d 0a 62 75 74 20 |ike ``it|,"..but |
|000037c0| 72 65 66 65 72 73 20 74 | 6f 20 74 68 65 20 6c 61 |refers t|o the la|
|000037d0| 73 74 20 6c 69 73 74 20 | 6f 66 20 6f 62 6a 65 63 |st list |of objec|
|000037e0| 74 73 0d 0a 69 66 20 6d | 75 6c 74 69 70 6c 65 20 |ts..if m|ultiple |
|000037f0| 64 69 72 65 63 74 20 6f | 62 6a 65 63 74 73 20 77 |direct o|bjects w|
|00003800| 65 72 65 20 75 73 65 64 | 2c 20 61 73 20 69 6e 2c |ere used|, as in,|
|00003810| 20 60 60 54 61 6b 65 0d | 0a 74 68 65 20 72 65 64 | ``Take.|.the red|
|00003820| 20 62 6f 6f 6b 20 61 6e | 64 20 74 68 65 20 62 6c | book an|d the bl|
|00003830| 75 65 20 62 6f 6f 6b 20 | 61 6e 64 20 70 75 74 20 |ue book |and put |
|00003840| 74 68 65 6d 20 69 6e 20 | 74 68 65 20 62 6f 78 2e |them in |the box.|
|00003850| 22 0d 0a 0d 0a 49 6e 20 | 61 64 64 69 74 69 6f 6e |"....In |addition|
|00003860| 20 74 6f 20 60 60 69 74 | 27 27 20 61 6e 64 20 60 | to ``it|'' and `|
|00003870| 60 74 68 65 6d 2c 27 27 | 20 74 68 65 20 70 61 72 |`them,''| the par|
|00003880| 73 65 72 20 75 6e 64 65 | 72 73 74 61 6e 64 73 20 |ser unde|rstands |
|00003890| 60 60 5e 7b 68 69 6d 7d | 27 27 0d 0a 61 6e 64 20 |``^{him}|''..and |
|000038a0| 60 60 5e 7b 68 65 72 7d | 27 27 20 74 6f 20 72 65 |``^{her}|'' to re|
|000038b0| 66 65 72 20 74 6f 20 61 | 63 74 6f 72 73 2e 20 20 |fer to a|ctors. |
|000038c0| 49 66 20 61 6e 20 6f 62 | 6a 65 63 74 20 68 61 73 |If an ob|ject has|
|000038d0| 20 74 68 65 20 70 72 6f | 70 65 72 74 79 20 7b 5c | the pro|perty {\|
|000038e0| 74 74 20 69 73 48 69 6d | 7d 0d 0a 73 65 74 20 74 |tt isHim|}..set t|
|000038f0| 6f 20 7b 5c 74 74 20 74 | 72 75 65 7d 2c 20 74 68 |o {\tt t|rue}, th|
|00003900| 65 20 70 61 72 73 65 72 | 20 61 6c 6c 6f 77 73 20 |e parser| allows |
|00003910| 74 68 65 20 70 6c 61 79 | 65 72 20 74 6f 20 72 65 |the play|er to re|
|00003920| 66 65 72 20 74 6f 20 74 | 68 65 20 6f 62 6a 65 63 |fer to t|he objec|
|00003930| 74 0d 0a 61 73 20 60 60 | 68 69 6d 27 27 2e 20 20 |t..as ``|him''. |
|00003940| 49 66 20 74 68 65 20 6f | 62 6a 65 63 74 20 68 61 |If the o|bject ha|
|00003950| 73 20 7b 5c 74 74 20 69 | 73 48 65 72 7d 20 73 65 |s {\tt i|sHer} se|
|00003960| 74 20 74 6f 20 7b 5c 74 | 74 20 74 72 75 65 7d 2c |t to {\t|t true},|
|00003970| 20 74 68 65 0d 0a 70 6c | 61 79 65 72 20 63 61 6e | the..pl|ayer can|
|00003980| 20 75 73 65 20 60 60 68 | 65 72 27 27 20 74 6f 20 | use ``h|er'' to |
|00003990| 72 65 66 65 72 20 74 6f | 20 74 68 65 20 6f 62 6a |refer to| the obj|
|000039a0| 65 63 74 2e 20 20 49 66 | 20 6e 65 69 74 68 65 72 |ect. If| neither|
|000039b0| 20 7b 5c 74 74 20 69 73 | 48 69 6d 7d 0d 0a 6e 6f | {\tt is|Him}..no|
|000039c0| 72 20 7b 5c 74 74 20 69 | 73 48 65 72 7d 20 69 73 |r {\tt i|sHer} is|
|000039d0| 20 73 65 74 20 74 6f 20 | 7b 5c 74 74 20 74 72 75 | set to |{\tt tru|
|000039e0| 65 7d 20 66 6f 72 20 74 | 68 65 20 6f 62 6a 65 63 |e} for t|he objec|
|000039f0| 74 2c 20 6f 6e 6c 79 20 | 60 60 69 74 27 27 20 63 |t, only |``it'' c|
|00003a00| 61 6e 0d 0a 62 65 20 75 | 73 65 64 20 74 6f 20 72 |an..be u|sed to r|
|00003a10| 65 66 65 72 20 74 6f 20 | 74 68 65 20 6f 62 6a 65 |efer to |the obje|
|00003a20| 63 74 2e 20 20 4e 6f 74 | 65 20 74 68 61 74 20 62 |ct. Not|e that b|
|00003a30| 6f 74 68 20 7b 5c 74 74 | 20 69 73 48 69 6d 7d 20 |oth {\tt| isHim} |
|00003a40| 61 6e 64 20 7b 5c 74 74 | 20 69 73 48 65 72 7d 0d |and {\tt| isHer}.|
|00003a50| 0a 63 61 6e 20 62 65 20 | 73 65 74 20 74 6f 20 7b |.can be |set to {|
|00003a60| 5c 74 74 20 74 72 75 65 | 7d 2c 20 69 6e 20 77 68 |\tt true|}, in wh|
|00003a70| 69 63 68 20 63 61 73 65 | 20 65 69 74 68 65 72 20 |ich case| either |
|00003a80| 60 60 68 69 6d 27 27 20 | 6f 72 20 60 60 68 65 72 |``him'' |or ``her|
|00003a90| 27 27 20 63 61 6e 0d 0a | 62 65 20 75 73 65 64 20 |'' can..|be used |
|00003aa0| 77 69 74 68 20 74 68 65 | 20 6f 62 6a 65 63 74 2e |with the| object.|
|00003ab0| 20 20 42 79 20 64 65 66 | 61 75 6c 74 2c 20 62 6f | By def|ault, bo|
|00003ac0| 74 68 20 61 72 65 20 7b | 5c 74 74 20 6e 69 6c 7d |th are {|\tt nil}|
|00003ad0| 2e 0d 0a 5e 5e 7b 69 73 | 48 65 72 7d 20 5e 5e 7b |...^^{is|Her} ^^{|
|00003ae0| 69 73 48 69 6d 7d 0d 0a | 20 20 20 20 0d 0a 54 68 |isHim}..| ..Th|
|00003af0| 65 72 65 27 73 20 6f 6e | 65 20 6d 6f 72 65 20 69 |ere's on|e more i|
|00003b00| 73 73 75 65 2c 20 77 68 | 69 63 68 20 69 73 20 61 |ssue, wh|ich is a|
|00003b10| 20 62 69 74 20 73 70 65 | 63 69 61 6c 69 7a 65 64 | bit spe|cialized|
|00003b20| 3a 20 20 77 68 61 74 20 | 68 61 70 70 65 6e 73 20 |: what |happens |
|00003b30| 69 66 20 74 68 65 20 70 | 6c 61 79 65 72 0d 0a 75 |if the p|layer..u|
|00003b40| 73 65 73 20 5e 7b 71 75 | 6f 74 65 64 20 73 74 72 |ses ^{qu|oted str|
|00003b50| 69 6e 67 73 7d 20 6f 72 | 20 5e 7b 6e 75 6d 62 65 |ings} or| ^{numbe|
|00003b60| 72 73 7d 20 69 6e 20 74 | 68 65 20 63 6f 6d 6d 61 |rs} in t|he comma|
|00003b70| 6e 64 3f 20 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |nd? For| example|
|00003b80| 3a 0d 0a 0d 0a 7b 5c 65 | 78 61 6d 70 6c 65 0d 0a |:....{\e|xample..|
|00003b90| 20 20 20 20 74 75 72 6e | 20 64 69 61 6c 20 74 6f | turn| dial to|
|00003ba0| 20 36 35 31 0d 0a 20 20 | 20 20 74 79 70 65 20 22 | 651.. | type "|
|00003bb0| 68 65 6c 6c 6f 22 20 6f | 6e 20 74 68 65 20 63 6f |hello" o|n the co|
|00003bc0| 6d 70 75 74 65 72 20 6b | 65 79 62 6f 61 72 64 0d |mputer k|eyboard.|
|00003bd0| 0a 5c 6d 65 64 73 6b 69 | 70 7d 0d 0a 0d 0a 43 6c |.\medski|p}....Cl|
|00003be0| 65 61 72 6c 79 2c 20 69 | 74 20 77 6f 75 6c 64 6e |early, i|t wouldn|
|00003bf0| 27 74 20 62 65 20 63 6f | 6e 76 65 6e 69 65 6e 74 |'t be co|nvenient|
|00003c00| 20 66 6f 72 20 74 68 65 | 20 67 61 6d 65 20 64 65 | for the| game de|
|00003c10| 73 69 67 6e 65 72 20 74 | 6f 20 6c 69 73 74 20 61 |signer t|o list a|
|00003c20| 6c 6c 20 70 6f 73 73 69 | 62 6c 65 0d 0a 6e 75 6d |ll possi|ble..num|
|00003c30| 62 65 72 73 20 74 68 65 | 20 70 6c 61 79 65 72 20 |bers the| player |
|00003c40| 6d 69 67 68 74 20 64 69 | 61 6c 2c 20 6f 72 20 61 |might di|al, or a|
|00003c50| 6c 6c 20 70 6f 73 73 69 | 62 6c 65 20 73 74 72 69 |ll possi|ble stri|
|00003c60| 6e 67 73 20 74 68 65 20 | 70 6c 61 79 65 72 20 6d |ngs the |player m|
|00003c70| 69 67 68 74 20 74 79 70 | 65 0d 0a 6f 6e 20 74 68 |ight typ|e..on th|
|00003c80| 65 20 63 6f 6d 70 75 74 | 65 72 20 6b 65 79 62 6f |e comput|er keybo|
|00003c90| 61 72 64 2e 20 20 49 6e | 73 74 65 61 64 2c 20 73 |ard. In|stead, s|
|00003ca0| 75 63 68 20 69 74 65 6d | 73 20 61 72 65 20 74 72 |uch item|s are tr|
|00003cb0| 65 61 74 65 64 20 61 73 | 20 73 70 65 63 69 61 6c |eated as| special|
|00003cc0| 20 70 73 65 75 64 6f 0d | 0a 6f 62 6a 65 63 74 73 | pseudo.|.objects|
|00003cd0| 3b 20 74 68 65 73 65 20 | 6f 62 6a 65 63 74 73 20 |; these |objects |
|00003ce0| 61 70 70 65 61 72 20 74 | 6f 20 74 68 65 20 67 61 |appear t|o the ga|
|00003cf0| 6d 65 20 61 73 20 6f 72 | 64 69 6e 61 72 79 20 28 |me as or|dinary (|
|00003d00| 62 75 74 20 73 70 65 63 | 69 66 69 63 29 20 6f 62 |but spec|ific) ob|
|00003d10| 6a 65 63 74 73 2c 0d 0a | 77 68 69 63 68 20 68 61 |jects,..|which ha|
|00003d20| 76 65 20 61 20 73 70 65 | 63 69 61 6c 20 70 72 6f |ve a spe|cial pro|
|00003d30| 70 65 72 74 79 20 77 68 | 69 63 68 20 61 6c 6c 6f |perty wh|ich allo|
|00003d40| 77 73 20 74 68 65 20 67 | 61 6d 65 20 74 6f 20 6c |ws the g|ame to l|
|00003d50| 65 61 72 6e 20 74 68 65 | 20 76 61 6c 75 65 20 28 |earn the| value (|
|00003d60| 73 75 63 68 0d 0a 61 73 | 20 36 35 31 20 6f 72 20 |such..as| 651 or |
|00003d70| 60 60 68 65 6c 6c 6f 22 | 29 2e 20 20 49 6e 20 74 |``hello"|). In t|
|00003d80| 68 69 73 20 77 61 79 2c | 20 74 68 65 20 67 61 6d |his way,| the gam|
|00003d90| 65 20 64 65 73 69 67 6e | 65 72 20 63 61 6e 20 64 |e design|er can d|
|00003da0| 65 61 6c 20 77 69 74 68 | 20 6e 75 6d 62 65 72 73 |eal with| numbers|
|00003db0| 20 61 6e 64 0d 0a 73 74 | 72 69 6e 67 73 20 69 6e | and..st|rings in|
|00003dc0| 20 61 20 67 65 6e 65 72 | 61 6c 20 77 61 79 2c 20 | a gener|al way, |
|00003dd0| 6c 65 74 74 69 6e 67 20 | 74 68 65 20 70 61 72 73 |letting |the pars|
|00003de0| 65 72 20 64 6f 20 61 6c | 6c 20 74 68 65 20 77 6f |er do al|l the wo|
|00003df0| 72 6b 2e 0d 0a 0d 0a 57 | 65 27 76 65 20 64 65 73 |rk.....W|e've des|
|00003e00| 63 72 69 62 65 64 20 74 | 68 65 20 70 61 72 73 65 |cribed t|he parse|
|00003e10| 72 20 66 72 6f 6d 20 74 | 68 65 20 75 73 65 72 27 |r from t|he user'|
|00003e20| 73 20 70 65 72 73 70 65 | 63 74 69 76 65 2c 20 77 |s perspe|ctive, w|
|00003e30| 69 74 68 20 73 6f 6d 65 | 20 69 6e 73 69 67 68 74 |ith some| insight|
|00003e40| 73 20 69 6e 74 6f 0d 0a | 68 6f 77 20 74 68 65 20 |s into..|how the |
|00003e50| 67 61 6d 65 20 70 72 6f | 67 72 61 6d 20 73 65 65 |game pro|gram see|
|00003e60| 73 20 63 6f 6d 6d 61 6e | 64 73 2e 20 20 4e 6f 77 |s comman|ds. Now|
|00003e70| 20 77 65 27 6c 6c 20 64 | 65 73 63 72 69 62 65 20 | we'll d|escribe |
|00003e80| 74 68 65 20 6c 6f 77 65 | 72 20 6c 61 79 65 72 73 |the lowe|r layers|
|00003e90| 20 6f 66 20 74 68 65 0d | 0a 77 6f 72 6b 20 74 68 | of the.|.work th|
|00003ea0| 65 20 70 61 72 73 65 72 | 20 64 6f 65 73 2e 0d 0a |e parser| does...|
|00003eb0| 0d 0a 5c 6d 69 6e 6f 72 | 73 65 63 74 69 6f 6e 7b |..\minor|section{|
|00003ec0| 41 73 73 6f 63 69 61 74 | 69 6e 67 20 57 6f 72 64 |Associat|ing Word|
|00003ed0| 73 20 77 69 74 68 20 4f | 62 6a 65 63 74 73 7d 0d |s with O|bjects}.|
|00003ee0| 0a 0d 0a 4f 6e 63 65 20 | 74 68 65 20 70 61 72 73 |...Once |the pars|
|00003ef0| 65 72 20 69 73 20 74 68 | 72 6f 75 67 68 20 77 69 |er is th|rough wi|
|00003f00| 74 68 20 61 20 63 6f 6d | 6d 61 6e 64 2c 20 61 73 |th a com|mand, as|
|00003f10| 73 75 6d 69 6e 67 20 61 | 6c 6c 20 77 65 6e 74 20 |suming a|ll went |
|00003f20| 77 65 6c 6c 20 77 69 74 | 68 20 74 68 65 0d 0a 67 |well wit|h the..g|
|00003f30| 72 61 6d 6d 61 72 20 6f | 66 20 74 68 65 20 73 65 |rammar o|f the se|
|00003f40| 6e 74 65 6e 63 65 2c 20 | 74 68 65 20 63 6f 6d 6d |ntence, |the comm|
|00003f50| 61 6e 64 20 68 61 73 20 | 62 65 65 6e 20 64 69 67 |and has |been dig|
|00003f60| 65 73 74 65 64 20 69 6e | 74 6f 20 6f 6e 6c 79 20 |ested in|to only |
|00003f70| 66 69 76 65 20 70 61 72 | 74 73 3a 0d 0a 61 6e 20 |five par|ts:..an |
|00003f80| 5e 7b 61 63 74 6f 72 7d | 2c 20 61 20 5e 7b 76 65 |^{actor}|, a ^{ve|
|00003f90| 72 62 7d 2c 20 61 20 5e | 7b 64 69 72 65 63 74 20 |rb}, a ^|{direct |
|00003fa0| 6f 62 6a 65 63 74 7d 2c | 20 61 6e 20 5e 7b 69 6e |object},| an ^{in|
|00003fb0| 64 69 72 65 63 74 20 6f | 62 6a 65 63 74 7d 2c 20 |direct o|bject}, |
|00003fc0| 61 6e 64 20 61 20 0d 0a | 5e 7b 70 72 65 70 6f 73 |and a ..|^{prepos|
|00003fd0| 69 74 69 6f 6e 7d 2e 0d | 0a 4f 66 20 74 68 65 73 |ition}..|.Of thes|
|00003fe0| 65 2c 20 6f 6e 6c 79 20 | 74 68 65 20 61 63 74 6f |e, only |the acto|
|00003ff0| 72 20 61 6e 64 20 76 65 | 72 62 20 61 72 65 20 6e |r and ve|rb are n|
|00004000| 65 63 65 73 73 61 72 69 | 6c 79 20 70 72 65 73 65 |ecessari|ly prese|
|00004010| 6e 74 3b 20 74 68 65 20 | 6f 74 68 65 72 73 20 6d |nt; the |others m|
|00004020| 61 79 0d 0a 62 65 20 7b | 5c 74 74 20 5e 7b 6e 69 |ay..be {|\tt ^{ni|
|00004030| 6c 7d 7d 2e 0d 0a 41 6c | 6c 20 6f 66 20 74 68 65 |l}}...Al|l of the|
|00004040| 73 65 20 69 74 65 6d 73 | 20 61 72 65 20 65 69 74 |se items| are eit|
|00004050| 68 65 72 20 7b 5c 74 74 | 20 6e 69 6c 7d 20 6f 72 |her {\tt| nil} or|
|00004060| 20 61 72 65 20 61 6e 20 | 6f 62 6a 65 63 74 20 64 | are an |object d|
|00004070| 65 66 69 6e 65 64 0d 0a | 62 79 20 74 68 65 20 67 |efined..|by the g|
|00004080| 61 6d 65 20 70 72 6f 67 | 72 61 6d 2e 0d 0a 0d 0a |ame prog|ram.....|
|00004090| 54 68 65 20 70 61 72 73 | 65 72 20 72 65 73 6f 6c |The pars|er resol|
|000040a0| 76 65 73 20 77 6f 72 64 | 73 20 74 6f 20 6f 62 6a |ves word|s to obj|
|000040b0| 65 63 74 73 20 62 61 73 | 65 64 20 6f 6e 20 5e 7b |ects bas|ed on ^{|
|000040c0| 76 6f 63 61 62 75 6c 61 | 72 79 7d 2e 20 20 0d 0a |vocabula|ry}. ..|
|000040d0| 54 68 65 20 77 6f 72 64 | 73 20 74 68 61 74 20 6d |The word|s that m|
|000040e0| 61 6b 65 0d 0a 75 70 20 | 74 68 65 20 76 6f 63 61 |ake..up |the voca|
|000040f0| 62 75 6c 61 72 79 20 61 | 76 61 69 6c 61 62 6c 65 |bulary a|vailable|
|00004100| 20 74 6f 20 74 68 65 20 | 75 73 65 72 20 63 6f 6e | to the |user con|
|00004110| 73 69 73 74 20 6f 66 20 | 74 68 65 20 73 65 76 65 |sist of |the seve|
|00004120| 72 61 6c 20 62 75 69 6c | 74 2d 69 6e 20 77 6f 72 |ral buil|t-in wor|
|00004130| 64 73 0d 0a 28 73 75 63 | 68 20 61 73 20 60 60 61 |ds..(suc|h as ``a|
|00004140| 6e 64 22 20 61 6e 64 20 | 60 60 74 68 65 6e 22 29 |nd" and |``then")|
|00004150| 20 61 6e 64 20 6f 66 20 | 74 68 65 20 77 6f 72 64 | and of |the word|
|00004160| 73 20 64 65 66 69 6e 65 | 64 20 69 6e 20 74 68 65 |s define|d in the|
|00004170| 20 67 61 6d 65 2e 20 0d | 0a 41 20 76 6f 63 61 62 | game. .|.A vocab|
|00004180| 75 6c 61 72 79 0d 0a 77 | 6f 72 64 20 69 73 20 63 |ulary..w|ord is c|
|00004190| 72 65 61 74 65 64 20 73 | 69 6d 70 6c 79 20 62 79 |reated s|imply by|
|000041a0| 20 61 73 73 6f 63 69 61 | 74 69 6e 67 20 61 20 73 | associa|ting a s|
|000041b0| 70 65 63 69 61 6c 20 70 | 72 6f 70 65 72 74 79 20 |pecial p|roperty |
|000041c0| 77 69 74 68 20 61 6e 20 | 6f 62 6a 65 63 74 3a 0d |with an |object:.|
|000041d0| 0a 0d 0a 7b 5c 65 78 61 | 6d 70 6c 65 0d 0a 20 20 |...{\exa|mple.. |
|000041e0| 20 20 5c 6f 62 6a 65 63 | 74 7b 52 65 64 42 6f 6f | \objec|t{RedBoo|
|000041f0| 6b 3a 20 6f 62 6a 65 63 | 74 7d 0d 0a 20 20 20 20 |k: objec|t}.. |
|00004200| 20 20 20 20 6e 6f 75 6e | 20 3d 20 27 62 6f 6f 6b | noun| = 'book|
|00004210| 27 0d 0a 09 61 64 6a 65 | 63 74 69 76 65 20 3d 20 |'...adje|ctive = |
|00004220| 27 72 65 64 27 20 27 6c | 61 72 67 65 27 0d 0a 09 |'red' 'l|arge'...|
|00004230| 70 6c 75 72 61 6c 20 3d | 20 27 62 6f 6f 6b 73 27 |plural =| 'books'|
|00004240| 0d 0a 20 20 20 20 5c 65 | 6e 64 6f 62 6a 0d 0a 7d |.. \e|ndobj..}|
|00004250| 0d 0a 0d 0a 49 6e 20 74 | 68 69 73 20 6f 62 6a 65 |....In t|his obje|
|00004260| 63 74 20 64 65 66 69 6e | 69 74 69 6f 6e 2c 20 74 |ct defin|ition, t|
|00004270| 68 65 20 73 70 65 63 69 | 61 6c 20 70 72 6f 70 65 |he speci|al prope|
|00004280| 72 74 79 20 6e 61 6d 65 | 73 20 7b 5c 74 74 20 6e |rty name|s {\tt n|
|00004290| 6f 75 6e 7d 2c 0d 0a 7b | 5c 74 74 20 61 64 6a 65 |oun},..{|\tt adje|
|000042a0| 63 74 69 76 65 7d 2c 20 | 61 6e 64 20 7b 5c 74 74 |ctive}, |and {\tt|
|000042b0| 20 70 6c 75 72 61 6c 7d | 0d 0a 61 72 65 20 64 65 | plural}|..are de|
|000042c0| 66 69 6e 65 64 20 74 6f | 20 62 65 20 6f 6e 65 20 |fined to| be one |
|000042d0| 6f 72 20 6d 6f 72 65 20 | 77 6f 72 64 73 2c 20 65 |or more |words, e|
|000042e0| 6e 63 6c 6f 73 65 64 20 | 69 6e 20 5e 7b 73 69 6e |nclosed |in ^{sin|
|000042f0| 67 6c 65 20 71 75 6f 74 | 65 73 7d 3b 20 74 68 65 |gle quot|es}; the|
|00004300| 73 65 0d 0a 77 6f 72 64 | 73 20 62 65 63 6f 6d 65 |se..word|s become|
|00004310| 20 76 6f 63 61 62 75 6c | 61 72 79 20 74 68 61 74 | vocabul|ary that|
|00004320| 20 74 68 65 20 70 6c 61 | 79 65 72 20 63 61 6e 20 | the pla|yer can |
|00004330| 75 73 65 2c 20 61 6e 64 | 20 73 70 65 63 69 66 79 |use, and| specify|
|00004340| 20 74 68 65 20 63 6f 6e | 74 65 78 74 20 69 6e 0d | the con|text in.|
|00004350| 0a 77 68 69 63 68 20 74 | 68 65 20 77 6f 72 64 73 |.which t|he words|
|00004360| 20 63 61 6e 20 62 65 20 | 75 73 65 64 2e 20 20 57 | can be |used. W|
|00004370| 68 65 6e 20 61 20 70 6c | 61 79 65 72 20 75 73 65 |hen a pl|ayer use|
|00004380| 73 20 74 68 65 20 77 6f | 72 64 73 20 60 60 72 65 |s the wo|rds ``re|
|00004390| 64 20 62 6f 6f 6b 22 20 | 69 6e 20 61 0d 0a 73 65 |d book" |in a..se|
|000043a0| 6e 74 65 6e 63 65 2c 20 | 74 68 65 20 70 61 72 73 |ntence, |the pars|
|000043b0| 65 72 20 77 69 6c 6c 20 | 6b 6e 6f 77 20 74 68 61 |er will |know tha|
|000043c0| 74 20 68 65 20 69 73 20 | 72 65 66 65 72 72 69 6e |t he is |referrin|
|000043d0| 67 20 74 6f 20 74 68 65 | 20 6f 62 6a 65 63 74 0d |g to the| object.|
|000043e0| 0a 7b 5c 74 74 20 52 65 | 64 42 6f 6f 6b 7d 2e 0d |.{\tt Re|dBook}..|
|000043f0| 0a 0d 0a 56 65 72 62 73 | 20 61 72 65 20 64 65 66 |...Verbs| are def|
|00004400| 69 6e 65 64 20 73 69 6d | 69 6c 61 72 6c 79 2c 20 |ined sim|ilarly, |
|00004410| 77 69 74 68 20 61 20 73 | 6c 69 67 68 74 20 63 61 |with a s|light ca|
|00004420| 74 63 68 2e 20 20 52 65 | 63 61 6c 6c 20 74 68 61 |tch. Re|call tha|
|00004430| 74 20 73 6f 6d 65 20 76 | 65 72 62 73 0d 0a 68 61 |t some v|erbs..ha|
|00004440| 64 20 61 20 70 72 65 70 | 6f 73 69 74 69 6f 6e 20 |d a prep|osition |
|00004450| 62 75 69 6c 74 20 69 6e | 74 6f 20 74 68 65 6d 2e |built in|to them.|
|00004460| 20 20 54 68 65 73 65 20 | 61 72 65 20 64 65 66 69 | These |are defi|
|00004470| 6e 65 64 20 6c 69 6b 65 | 20 74 68 69 73 3a 0d 0a |ned like| this:..|
|00004480| 0d 0a 7b 5c 65 78 61 6d | 70 6c 65 0d 0a 20 20 20 |..{\exam|ple.. |
|00004490| 20 5c 6f 62 6a 65 63 74 | 7b 54 61 6b 65 56 65 72 | \object|{TakeVer|
|000044a0| 62 3a 20 6f 62 6a 65 63 | 74 7d 0d 0a 20 20 20 20 |b: objec|t}.. |
|000044b0| 20 20 20 20 76 65 72 62 | 20 3d 20 27 74 61 6b 65 | verb| = 'take|
|000044c0| 27 20 27 70 69 63 6b 20 | 75 70 27 0d 0a 20 20 20 |' 'pick |up'.. |
|000044d0| 20 5c 65 6e 64 6f 62 6a | 0d 0a 7d 0d 0a 0d 0a 54 | \endobj|..}....T|
|000044e0| 68 69 73 20 61 73 73 6f | 63 69 61 74 65 73 20 74 |his asso|ciates t|
|000044f0| 68 65 20 77 6f 72 64 20 | 60 60 74 61 6b 65 22 20 |he word |``take" |
|00004500| 77 69 74 68 20 74 68 65 | 20 6f 62 6a 65 63 74 20 |with the| object |
|00004510| 7b 5c 74 74 20 54 61 6b | 65 56 65 72 62 7d 2c 0d |{\tt Tak|eVerb},.|
|00004520| 0a 61 73 20 77 65 6c 6c | 20 61 73 20 74 68 65 20 |.as well| as the |
|00004530| 77 6f 72 64 73 0d 0a 60 | 60 70 69 63 6b 20 75 70 |words..`|`pick up|
|00004540| 22 2e 20 20 57 68 65 6e | 20 61 20 70 6c 61 79 65 |". When| a playe|
|00004550| 72 20 74 79 70 65 73 20 | 61 20 63 6f 6d 6d 61 6e |r types |a comman|
|00004560| 64 20 73 75 63 68 20 61 | 73 20 60 60 70 69 63 6b |d such a|s ``pick|
|00004570| 20 69 74 20 75 70 22 2c | 20 74 68 65 20 70 61 72 | it up",| the par|
|00004580| 73 65 72 0d 0a 77 69 6c | 6c 20 64 65 63 69 64 65 |ser..wil|l decide|
|00004590| 20 74 68 61 74 20 74 68 | 65 20 76 65 72 62 20 69 | that th|e verb i|
|000045a0| 73 20 74 68 65 20 6f 62 | 6a 65 63 74 20 7b 5c 74 |s the ob|ject {\t|
|000045b0| 74 20 54 61 6b 65 56 65 | 72 62 7d 2e 20 20 54 68 |t TakeVe|rb}. Th|
|000045c0| 69 73 20 6e 6f 74 61 74 | 69 6f 6e 2c 20 69 6e 0d |is notat|ion, in.|
|000045d0| 0a 77 68 69 63 68 20 74 | 77 6f 20 77 6f 72 64 73 |.which t|wo words|
|000045e0| 20 61 70 70 65 61 72 20 | 69 6e 20 61 20 73 69 6e | appear |in a sin|
|000045f0| 67 6c 65 20 76 6f 63 61 | 62 75 6c 61 72 79 20 77 |gle voca|bulary w|
|00004600| 6f 72 64 20 73 74 72 69 | 6e 67 2c 20 69 73 20 73 |ord stri|ng, is s|
|00004610| 70 65 63 69 61 6c 20 74 | 6f 0d 0a 76 65 72 62 73 |pecial t|o..verbs|
|00004620| 20 61 6e 64 20 69 73 20 | 6e 6f 74 20 61 6c 6c 6f | and is |not allo|
|00004630| 77 65 64 20 65 6c 73 65 | 77 68 65 72 65 2e 0d 0a |wed else|where...|
|00004640| 0d 0a 49 74 20 69 73 20 | 69 6d 70 6f 72 74 61 6e |..It is |importan|
|00004650| 74 20 61 74 20 74 68 69 | 73 20 70 6f 69 6e 74 20 |t at thi|s point |
|00004660| 74 6f 20 64 69 73 74 69 | 6e 67 75 69 73 68 20 62 |to disti|nguish b|
|00004670| 65 74 77 65 65 6e 20 74 | 77 6f 20 74 79 70 65 73 |etween t|wo types|
|00004680| 20 6f 66 20 6f 62 6a 65 | 63 74 73 2e 20 54 68 65 | of obje|cts. The|
|00004690| 0d 0a 66 69 72 73 74 20 | 74 79 70 65 20 6f 66 20 |..first |type of |
|000046a0| 6f 62 6a 65 63 74 20 69 | 73 20 74 68 65 20 6b 69 |object i|s the ki|
|000046b0| 6e 64 20 74 68 61 74 20 | 61 70 70 65 61 72 73 20 |nd that |appears |
|000046c0| 69 6e 20 74 68 65 20 67 | 61 6d 65 20 70 72 6f 67 |in the g|ame prog|
|000046d0| 72 61 6d 3b 20 74 68 65 | 73 65 20 68 61 76 65 0d |ram; the|se have.|
|000046e0| 0a 73 75 70 65 72 63 6c | 61 73 73 65 73 20 61 6e |.supercl|asses an|
|000046f0| 64 20 70 72 6f 70 65 72 | 74 69 65 73 2c 20 61 6e |d proper|ties, an|
|00004700| 64 20 61 72 65 20 6d 61 | 6e 69 70 75 6c 61 74 65 |d are ma|nipulate|
|00004710| 64 20 62 79 20 63 6f 64 | 65 2e 20 20 54 68 65 20 |d by cod|e. The |
|00004720| 6f 74 68 65 72 20 74 79 | 70 65 20 6f 66 0d 0a 6f |other ty|pe of..o|
|00004730| 62 6a 65 63 74 20 69 73 | 20 74 68 65 20 6b 69 6e |bject is| the kin|
|00004740| 64 20 74 68 65 20 70 6c | 61 79 65 72 20 74 68 69 |d the pl|ayer thi|
|00004750| 6e 6b 73 20 6f 66 20 77 | 68 65 6e 20 68 65 20 73 |nks of w|hen he s|
|00004760| 61 79 73 20 60 60 74 61 | 6b 65 20 74 68 65 20 62 |ays ``ta|ke the b|
|00004770| 6f 6f 6b 2e 22 20 20 53 | 6f 2c 0d 0a 77 68 65 6e |ook." S|o,..when|
|00004780| 20 77 65 20 63 61 6c 6c | 20 61 20 76 65 72 62 20 | we call| a verb |
|00004790| 61 6e 20 6f 62 6a 65 63 | 74 2c 20 77 65 20 6d 65 |an objec|t, we me|
|000047a0| 61 6e 20 69 74 20 69 6e | 20 74 68 65 20 66 69 72 |an it in| the fir|
|000047b0| 73 74 20 73 65 6e 73 65 | 2c 20 62 75 74 20 77 68 |st sense|, but wh|
|000047c0| 65 6e 20 77 65 0d 0a 74 | 61 6c 6b 20 61 62 6f 75 |en we..t|alk abou|
|000047d0| 74 20 74 68 65 20 75 73 | 65 72 20 73 70 65 63 69 |t the us|er speci|
|000047e0| 66 79 69 6e 67 20 61 6e | 20 6f 62 6a 65 63 74 20 |fying an| object |
|000047f0| 77 69 74 68 20 6e 6f 75 | 6e 73 20 61 6e 64 20 61 |with nou|ns and a|
|00004800| 64 6a 65 63 74 69 76 65 | 73 2c 20 77 65 27 72 65 |djective|s, we're|
|00004810| 0d 0a 75 73 69 6e 67 20 | 74 68 65 20 6f 74 68 65 |..using |the othe|
|00004820| 72 20 73 65 6e 73 65 2e | 0d 0a 0d 0a 54 68 65 72 |r sense.|....Ther|
|00004830| 65 20 61 72 65 20 74 77 | 6f 20 6f 74 68 65 72 20 |e are tw|o other |
|00004840| 6b 69 6e 64 73 20 6f 66 | 20 76 6f 63 61 62 75 6c |kinds of| vocabul|
|00004850| 61 72 79 20 77 6f 72 64 | 73 3a 20 20 70 72 65 70 |ary word|s: prep|
|00004860| 6f 73 69 74 69 6f 6e 73 | 20 61 6e 64 0d 0a 61 72 |ositions| and..ar|
|00004870| 74 69 63 6c 65 73 2e 20 | 20 46 6f 72 20 65 78 61 |ticles. | For exa|
|00004880| 6d 70 6c 65 3a 0d 0a 0d | 0a 7b 5c 65 78 61 6d 70 |mple:...|.{\examp|
|00004890| 6c 65 0d 0a 20 20 20 20 | 5c 6f 62 6a 65 63 74 7b |le.. |\object{|
|000048a0| 4f 75 74 50 3a 20 6f 62 | 6a 65 63 74 7d 0d 0a 20 |OutP: ob|ject}.. |
|000048b0| 20 20 20 20 20 20 20 70 | 72 65 70 6f 73 69 74 69 | p|repositi|
|000048c0| 6f 6e 20 3d 20 27 6f 75 | 74 27 0d 0a 20 20 20 20 |on = 'ou|t'.. |
|000048d0| 5c 65 6e 64 6f 62 6a 0d | 0a 20 20 20 20 0d 0a 20 |\endobj.|. .. |
|000048e0| 20 20 20 5c 6f 62 6a 65 | 63 74 7b 41 41 6e 54 68 | \obje|ct{AAnTh|
|000048f0| 65 3a 20 6f 62 6a 65 63 | 74 7d 0d 0a 20 20 20 20 |e: objec|t}.. |
|00004900| 20 20 20 20 61 72 74 69 | 63 6c 65 20 3d 20 27 74 | arti|cle = 't|
|00004910| 68 65 27 20 27 61 27 20 | 27 61 6e 27 0d 0a 20 20 |he' 'a' |'an'.. |
|00004920| 20 20 5c 65 6e 64 6f 62 | 6a 0d 0a 7d 0d 0a 0d 0a | \endob|j..}....|
|00004930| 4e 6f 74 65 20 74 68 61 | 74 20 74 68 65 20 73 65 |Note tha|t the se|
|00004940| 63 6f 6e 64 20 6f 62 6a | 65 63 74 20 64 6f 65 73 |cond obj|ect does|
|00004950| 6e 27 74 20 64 69 73 74 | 69 6e 67 75 69 73 68 20 |n't dist|inguish |
|00004960| 62 65 74 77 65 65 6e 20 | 74 68 65 20 5e 7b 61 72 |between |the ^{ar|
|00004970| 74 69 63 6c 65 73 7d 3b | 0d 0a 74 68 69 73 20 69 |ticles};|..this i|
|00004980| 73 0d 0a 70 65 72 66 65 | 63 74 6c 79 20 61 6c 6c |s..perfe|ctly all|
|00004990| 20 72 69 67 68 74 2c 20 | 62 65 63 61 75 73 65 20 | right, |because |
|000049a0| 74 68 65 79 27 6c 6c 20 | 6e 65 76 65 72 20 6d 61 |they'll |never ma|
|000049b0| 6b 65 20 69 74 20 64 6f | 77 6e 20 74 6f 20 74 68 |ke it do|wn to th|
|000049c0| 65 20 67 61 6d 65 20 70 | 72 6f 67 72 61 6d 2e 0d |e game p|rogram..|
|000049d0| 0a 54 68 65 79 20 61 72 | 65 20 64 65 66 69 6e 65 |.They ar|e define|
|000049e0| 64 20 6d 65 72 65 6c 79 | 20 74 6f 20 6d 61 6b 65 |d merely| to make|
|000049f0| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 20 73 79 6e | the com|mand syn|
|00004a00| 74 61 78 20 6d 6f 72 65 | 20 6e 61 74 75 72 61 6c |tax more| natural|
|00004a10| 20 66 6f 72 20 74 68 65 | 20 75 73 65 72 2e 0d 0a | for the| user...|
|00004a20| 5e 7b 50 72 65 70 6f 73 | 69 74 69 6f 6e 73 7d 2c |^{Prepos|itions},|
|00004a30| 20 6f 6e 20 74 68 65 20 | 6f 74 68 65 72 20 68 61 | on the |other ha|
|00004a40| 6e 64 2c 20 73 68 6f 75 | 6c 64 20 62 65 20 64 69 |nd, shou|ld be di|
|00004a50| 73 74 69 6e 67 75 69 73 | 68 65 64 20 66 72 6f 6d |stinguis|hed from|
|00004a60| 20 65 61 63 68 20 6f 74 | 68 65 72 2c 0d 0a 62 65 | each ot|her,..be|
|00004a70| 63 61 75 73 65 20 60 60 | 70 75 74 20 74 68 65 20 |cause ``|put the |
|00004a80| 62 6f 6f 6b 20 69 6e 20 | 74 68 65 20 73 61 66 65 |book in |the safe|
|00004a90| 22 20 69 73 20 64 69 66 | 66 65 72 65 6e 74 20 66 |" is dif|ferent f|
|00004aa0| 72 6f 6d 20 60 60 70 75 | 74 20 74 68 65 20 62 6f |rom ``pu|t the bo|
|00004ab0| 6f 6b 20 6f 6e 20 74 68 | 65 0d 0a 73 61 66 65 22 |ok on th|e..safe"|
|00004ac0| 2e 0d 0a 0d 0a 4e 6f 74 | 65 20 61 6c 73 6f 20 74 |.....Not|e also t|
|00004ad0| 68 61 74 20 75 73 69 6e | 67 20 61 20 70 72 65 70 |hat usin|g a prep|
|00004ae0| 6f 73 69 74 69 6f 6e 20 | 69 6e 20 61 20 76 65 72 |osition |in a ver|
|00004af0| 62 20 64 6f 65 73 6e 27 | 74 20 6d 61 6b 65 20 69 |b doesn'|t make i|
|00004b00| 74 20 61 20 70 72 65 70 | 6f 73 69 74 69 6f 6e 3b |t a prep|osition;|
|00004b10| 0d 0a 68 65 6e 63 65 2c | 20 65 76 65 6e 20 74 68 |..hence,| even th|
|00004b20| 6f 75 67 68 20 77 65 20 | 64 65 66 69 6e 65 64 20 |ough we |defined |
|00004b30| 7b 5c 74 74 20 27 70 69 | 63 6b 20 75 70 27 7d 20 |{\tt 'pi|ck up'} |
|00004b40| 61 73 20 61 20 76 65 72 | 62 20 65 61 72 6c 69 65 |as a ver|b earlie|
|00004b50| 72 2c 0d 0a 77 65 20 73 | 68 6f 75 6c 64 20 73 74 |r,..we s|hould st|
|00004b60| 69 6c 6c 20 64 65 66 69 | 6e 65 20 61 0d 0a 73 65 |ill defi|ne a..se|
|00004b70| 70 61 72 61 74 65 20 70 | 72 65 70 6f 73 69 74 69 |parate p|repositi|
|00004b80| 6f 6e 20 66 6f 72 20 60 | 60 75 70 22 3a 0d 0a 0d |on for `|`up":...|
|00004b90| 0a 7b 5c 65 78 61 6d 70 | 6c 65 0d 0a 20 20 20 20 |.{\examp|le.. |
|00004ba0| 5c 6f 62 6a 65 63 74 7b | 55 70 50 3a 20 6f 62 6a |\object{|UpP: obj|
|00004bb0| 65 63 74 7d 0d 0a 20 20 | 20 20 20 20 20 20 70 72 |ect}.. | pr|
|00004bc0| 65 70 6f 73 69 74 69 6f | 6e 20 3d 20 27 75 70 27 |epositio|n = 'up'|
|00004bd0| 0d 0a 20 20 20 20 5c 65 | 6e 64 6f 62 6a 0d 0a 7d |.. \e|ndobj..}|
|00004be0| 0d 0a 0d 0a 54 68 69 73 | 20 62 72 69 6e 67 73 20 |....This| brings |
|00004bf0| 75 73 20 74 6f 20 5e 7b | 61 6d 62 69 67 75 69 74 |us to ^{|ambiguit|
|00004c00| 79 7d 2e 20 20 0d 0a 4d | 6f 73 74 20 61 64 76 65 |y}. ..M|ost adve|
|00004c10| 6e 74 75 72 65 73 20 61 | 6c 6c 6f 77 20 79 6f 75 |ntures a|llow you|
|00004c20| 20 74 6f 20 73 61 79 20 | 60 60 75 70 22 20 77 68 | to say |``up" wh|
|00004c30| 65 6e 20 79 6f 75 0d 0a | 6d 65 61 6e 20 79 6f 75 |en you..|mean you|
|00004c40| 20 77 61 6e 74 20 74 6f | 20 60 60 67 6f 20 75 70 | want to| ``go up|
|00004c50| 22 2e 20 20 48 65 6e 63 | 65 2c 20 77 65 20 73 68 |". Henc|e, we sh|
|00004c60| 6f 75 6c 64 20 64 65 66 | 69 6e 65 20 61 20 76 65 |ould def|ine a ve|
|00004c70| 72 62 3a 0d 0a 0d 0a 7b | 5c 65 78 61 6d 70 6c 65 |rb:....{|\example|
|00004c80| 0d 0a 20 20 20 20 5c 6f | 62 6a 65 63 74 7b 47 6f |.. \o|bject{Go|
|00004c90| 55 70 3a 20 6f 62 6a 65 | 63 74 7d 0d 0a 20 20 20 |Up: obje|ct}.. |
|00004ca0| 20 20 20 20 20 76 65 72 | 62 20 3d 20 27 67 6f 20 | ver|b = 'go |
|00004cb0| 75 70 27 20 27 75 70 27 | 0d 0a 20 20 20 20 5c 65 |up' 'up'|.. \e|
|00004cc0| 6e 64 6f 62 6a 0d 0a 7d | 0d 0a 0d 0a 54 68 69 73 |ndobj..}|....This|
|00004cd0| 20 6d 69 67 68 74 20 6c | 6f 6f 6b 20 6c 69 6b 65 | might l|ook like|
|00004ce0| 20 61 20 70 72 6f 62 6c | 65 6d 2c 20 62 65 63 61 | a probl|em, beca|
|00004cf0| 75 73 65 20 77 65 27 76 | 65 20 64 65 66 69 6e 65 |use we'v|e define|
|00004d00| 64 20 61 20 77 6f 72 64 | 20 61 73 20 61 20 70 72 |d a word| as a pr|
|00004d10| 65 70 6f 73 69 74 69 6f | 6e 2c 0d 0a 61 73 20 61 |epositio|n,..as a|
|00004d20| 20 76 65 72 62 27 73 20 | 70 72 65 70 6f 73 69 74 | verb's |preposit|
|00004d30| 69 6f 6e 2c 20 61 6e 64 | 20 61 73 20 61 20 76 65 |ion, and| as a ve|
|00004d40| 72 62 21 20 20 46 6f 72 | 74 75 6e 61 74 65 6c 79 |rb! For|tunately|
|00004d50| 2c 20 74 68 65 20 70 61 | 72 73 65 72 20 75 6e 64 |, the pa|rser und|
|00004d60| 65 72 73 74 61 6e 64 73 | 0d 0a 74 68 65 20 69 6d |erstands|..the im|
|00004d70| 70 6f 72 74 61 6e 63 65 | 20 6f 66 20 63 6f 6e 74 |portance| of cont|
|00004d80| 65 78 74 20 61 6e 64 20 | 77 69 6c 6c 20 6e 6f 74 |ext and |will not|
|00004d90| 20 62 65 20 63 6f 6e 66 | 75 73 65 64 20 69 6e 20 | be conf|used in |
|00004da0| 74 68 69 73 20 63 61 73 | 65 2e 20 20 54 68 69 73 |this cas|e. This|
|00004db0| 0d 0a 73 68 6f 75 6c 64 | 6e 27 74 20 62 65 20 74 |..should|n't be t|
|00004dc0| 61 6b 65 6e 20 61 73 20 | 6c 69 63 65 6e 73 65 20 |aken as |license |
|00004dd0| 74 6f 20 64 65 66 69 6e | 65 20 65 76 65 72 79 20 |to defin|e every |
|00004de0| 77 6f 72 64 20 61 73 20 | 65 76 65 72 79 20 70 61 |word as |every pa|
|00004df0| 72 74 20 6f 66 20 73 70 | 65 65 63 68 3b 20 74 68 |rt of sp|eech; th|
|00004e00| 65 0d 0a 70 61 72 73 65 | 72 20 63 61 6e 20 67 65 |e..parse|r can ge|
|00004e10| 74 20 63 6f 6e 66 75 73 | 65 64 20 61 6e 64 20 69 |t confus|ed and i|
|00004e20| 6e 74 65 72 70 72 65 74 | 20 73 65 6e 74 65 6e 63 |nterpret| sentenc|
|00004e30| 65 73 20 73 74 72 61 6e | 67 65 6c 79 20 69 66 20 |es stran|gely if |
|00004e40| 63 6f 6e 74 65 78 74 75 | 61 6c 0d 0a 64 69 73 61 |contextu|al..disa|
|00004e50| 6d 62 69 67 75 61 74 69 | 6f 6e 20 69 73 20 6f 76 |mbiguati|on is ov|
|00004e60| 65 72 75 73 65 64 2e 20 | 20 49 66 20 79 6f 75 20 |erused. | If you |
|00004e70| 72 75 6e 20 69 6e 74 6f | 20 73 74 72 61 6e 67 65 |run into| strange|
|00004e80| 20 69 6e 74 65 72 70 72 | 65 74 61 74 69 6f 6e 73 | interpr|etations|
|00004e90| 20 6f 66 0d 0a 73 65 6e | 74 65 6e 63 65 73 2c 20 | of..sen|tences, |
|00004ea0| 79 6f 75 20 6d 69 67 68 | 74 20 63 68 65 63 6b 20 |you migh|t check |
|00004eb0| 66 6f 72 20 70 61 72 74 | 2d 6f 66 2d 73 70 65 65 |for part|-of-spee|
|00004ec0| 63 68 20 61 6d 62 69 67 | 75 69 74 69 65 73 2e 0d |ch ambig|uities..|
|00004ed0| 0a 0d 0a 54 68 65 20 5e | 7b 76 6f 63 61 62 75 6c |...The ^|{vocabul|
|00004ee0| 61 72 79 20 70 72 6f 70 | 65 72 74 69 65 73 7d 2c |ary prop|erties},|
|00004ef0| 20 7b 5c 74 74 20 76 65 | 72 62 7d 2c 20 0d 0a 7b | {\tt ve|rb}, ..{|
|00004f00| 5c 74 74 20 6e 6f 75 6e | 7d 2c 20 7b 5c 74 74 20 |\tt noun|}, {\tt |
|00004f10| 61 64 6a 65 63 74 69 76 | 65 7d 2c 20 7b 5c 74 74 |adjectiv|e}, {\tt|
|00004f20| 20 61 72 74 69 63 6c 65 | 7d 2c 20 7b 5c 74 74 20 | article|}, {\tt |
|00004f30| 70 72 65 70 6f 73 69 74 | 69 6f 6e 7d 2c 0d 0a 61 |preposit|ion},..a|
|00004f40| 6e 64 20 7b 5c 74 74 20 | 70 6c 75 72 61 6c 7d 2c |nd {\tt |plural},|
|00004f50| 20 68 61 76 65 20 73 70 | 65 63 69 61 6c 20 63 68 | have sp|ecial ch|
|00004f60| 61 72 61 63 74 65 72 69 | 73 74 69 63 73 2e 20 20 |aracteri|stics. |
|00004f70| 54 68 65 79 20 61 72 65 | 20 6e 6f 74 20 70 72 6f |They are| not pro|
|00004f80| 70 65 72 74 69 65 73 0d | 0a 69 6e 20 74 68 65 20 |perties.|.in the |
|00004f90| 6e 6f 72 6d 61 6c 20 73 | 65 6e 73 65 2c 20 66 6f |normal s|ense, fo|
|00004fa0| 72 20 61 0d 0a 6e 75 6d | 62 65 72 20 6f 66 20 72 |r a..num|ber of r|
|00004fb0| 65 61 73 6f 6e 73 2e 20 | 20 46 69 72 73 74 2c 20 |easons. | First, |
|00004fc0| 74 68 65 79 20 61 72 65 | 20 73 70 65 63 69 61 6c |they are| special|
|00004fd0| 6c 79 20 72 65 63 6f 67 | 6e 69 7a 65 64 20 61 73 |ly recog|nized as|
|00004fe0| 20 63 72 65 61 74 69 6e | 67 20 76 6f 63 61 62 75 | creatin|g vocabu|
|00004ff0| 6c 61 72 79 0d 0a 77 6f | 72 64 73 20 61 6e 64 20 |lary..wo|rds and |
|00005000| 61 73 73 6f 63 69 61 74 | 69 6e 67 20 74 68 65 6d |associat|ing them|
|00005010| 20 77 69 74 68 20 6f 62 | 6a 65 63 74 73 2e 20 20 | with ob|jects. |
|00005020| 53 65 63 6f 6e 64 2c 20 | 79 6f 75 20 6d 69 67 68 |Second, |you migh|
|00005030| 74 20 68 61 76 65 20 6e | 6f 74 69 63 65 64 20 74 |t have n|oticed t|
|00005040| 68 65 0d 0a 6e 6f 6e 2d | 73 74 61 6e 64 61 72 64 |he..non-|standard|
|00005050| 20 73 79 6e 74 61 78 3a | 20 20 61 20 6c 69 73 74 | syntax:| a list|
|00005060| 20 6f 66 20 77 6f 72 64 | 73 20 66 6f 6c 6c 6f 77 | of word|s follow|
|00005070| 73 20 74 68 65 20 70 72 | 6f 70 65 72 74 79 20 6e |s the pr|operty n|
|00005080| 61 6d 65 0d 0a 7b 5c 69 | 74 20 77 69 74 68 6f 75 |ame..{\i|t withou|
|00005090| 74 7d 20 62 65 69 6e 67 | 20 65 6e 63 6c 6f 73 65 |t} being| enclose|
|000050a0| 64 20 69 6e 20 5e 7b 73 | 71 75 61 72 65 20 62 72 |d in ^{s|quare br|
|000050b0| 61 63 6b 65 74 73 7d 2e | 20 20 49 6e 20 61 64 64 |ackets}.| In add|
|000050c0| 69 74 69 6f 6e 2c 20 79 | 6f 75 0d 0a 63 61 6e 6e |ition, y|ou..cann|
|000050d0| 6f 74 20 72 65 66 65 72 | 65 6e 63 65 20 76 6f 63 |ot refer|ence voc|
|000050e0| 61 62 75 6c 61 72 79 20 | 70 72 6f 70 65 72 74 69 |abulary |properti|
|000050f0| 65 73 20 61 73 20 79 6f | 75 20 63 61 6e 20 77 69 |es as yo|u can wi|
|00005100| 74 68 20 6f 74 68 65 72 | 20 70 72 6f 70 65 72 74 |th other| propert|
|00005110| 69 65 73 3b 0d 0a 66 6f | 72 20 65 78 61 6d 70 6c |ies;..fo|r exampl|
|00005120| 65 2c 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |e, the f|ollowing|
|00005130| 20 65 78 61 6d 70 6c 65 | 20 77 69 6c 6c 20 6e 6f | example| will no|
|00005140| 74 20 77 6f 72 6b 3a 0d | 0a 0d 0a 7b 5c 65 78 61 |t work:.|...{\exa|
|00005150| 6d 70 6c 65 0d 0a 20 20 | 20 20 73 61 79 28 64 6f |mple.. | say(do|
|00005160| 62 6a 2e 6e 6f 75 6e 29 | 3b 20 5c 68 66 69 6c 6c |bj.noun)|; \hfill|
|00005170| 20 2f 2f 20 54 68 69 73 | 20 77 6f 6e 27 74 20 77 | // This| won't w|
|00005180| 6f 72 6b 21 0d 0a 5c 6d | 65 64 73 6b 69 70 7d 0d |ork!..\m|edskip}.|
|00005190| 0a 0d 0a 46 6f 72 20 74 | 68 69 73 20 72 65 61 73 |...For t|his reas|
|000051a0| 6f 6e 2c 20 61 6c 6c 20 | 6f 62 6a 65 63 74 73 20 |on, all |objects |
|000051b0| 77 68 69 63 68 20 68 61 | 76 65 0d 0a 76 6f 63 61 |which ha|ve..voca|
|000051c0| 62 75 6c 61 72 79 20 61 | 73 73 6f 63 69 61 74 65 |bulary a|ssociate|
|000051d0| 64 20 77 69 74 68 20 74 | 68 65 6d 20 73 68 6f 75 |d with t|hem shou|
|000051e0| 6c 64 20 68 61 76 65 20 | 61 20 73 68 6f 72 74 20 |ld have |a short |
|000051f0| 64 65 73 63 72 69 70 74 | 69 6f 6e 2c 20 6f 72 0d |descript|ion, or.|
|00005200| 0a 7b 5c 74 74 20 5e 7b | 73 64 65 73 63 7d 7d 20 |.{\tt ^{|sdesc}} |
|00005210| 70 72 6f 70 65 72 74 79 | 2e 0d 0a 53 6f 2c 20 74 |property|...So, t|
|00005220| 68 65 20 66 75 6c 6c 20 | 64 65 66 69 6e 69 74 69 |he full |definiti|
|00005230| 6f 6e 20 6f 66 20 74 68 | 65 20 60 60 75 70 22 20 |on of th|e ``up" |
|00005240| 70 72 65 70 6f 73 69 74 | 69 6f 6e 20 61 62 6f 76 |preposit|ion abov|
|00005250| 65 20 73 68 6f 75 6c 64 | 20 62 65 3a 0d 0a 0d 0a |e should| be:....|
|00005260| 7b 5c 65 78 61 6d 70 6c | 65 0d 0a 20 20 20 20 5c |{\exampl|e.. \|
|00005270| 6f 62 6a 65 63 74 7b 55 | 70 50 3a 20 6f 62 6a 65 |object{U|pP: obje|
|00005280| 63 74 7d 0d 0a 20 20 20 | 20 20 20 20 20 70 72 65 |ct}.. | pre|
|00005290| 70 6f 73 69 74 69 6f 6e | 20 3d 20 27 75 70 27 0d |position| = 'up'.|
|000052a0| 0a 09 73 64 65 73 63 20 | 3d 20 22 75 70 22 0d 0a |..sdesc |= "up"..|
|000052b0| 20 20 20 20 5c 65 6e 64 | 6f 62 6a 0d 0a 7d 0d 0a | \end|obj..}..|
|000052c0| 0d 0a 49 6e 20 63 6f 6e | 73 74 72 75 63 74 69 6e |..In con|structin|
|000052d0| 67 20 63 65 72 74 61 69 | 6e 20 63 6f 6d 70 6c 61 |g certai|n compla|
|000052e0| 69 6e 74 73 20 61 62 6f | 75 74 20 62 61 64 20 67 |ints abo|ut bad g|
|000052f0| 72 61 6d 6d 61 72 20 6f | 72 20 6f 74 68 65 72 20 |rammar o|r other |
|00005300| 70 72 6f 62 6c 65 6d 73 | 2c 20 74 68 65 0d 0a 70 |problems|, the..p|
|00005310| 61 72 73 65 72 20 77 69 | 6c 6c 20 6f 63 63 61 73 |arser wi|ll occas|
|00005320| 69 6f 6e 61 6c 6c 79 20 | 6e 65 65 64 20 74 68 65 |ionally |need the|
|00005330| 20 7b 5c 74 74 20 73 64 | 65 73 63 7d 20 6f 66 20 | {\tt sd|esc} of |
|00005340| 61 20 70 72 65 70 6f 73 | 69 74 69 6f 6e 2c 20 6e |a prepos|ition, n|
|00005350| 6f 75 6e 20 6f 72 0d 0a | 76 65 72 62 2c 20 73 6f |oun or..|verb, so|
|00005360| 20 62 65 20 73 75 72 65 | 0d 0a 65 61 63 68 20 6f | be sure|..each o|
|00005370| 62 6a 65 63 74 20 68 61 | 73 20 6f 6e 65 2e 20 20 |bject ha|s one. |
|00005380| 5e 7b 41 72 74 69 63 6c | 65 73 7d 20 6e 65 76 65 |^{Articl|es} neve|
|00005390| 72 20 6e 65 65 64 20 61 | 6e 20 7b 5c 74 74 20 73 |r need a|n {\tt s|
|000053a0| 64 65 73 63 7d 20 61 73 | 20 66 61 72 20 61 73 20 |desc} as| far as |
|000053b0| 74 68 65 0d 0a 70 61 72 | 73 65 72 20 69 73 20 63 |the..par|ser is c|
|000053c0| 6f 6e 63 65 72 6e 65 64 | 2e 20 20 7b 5c 74 74 20 |oncerned|. {\tt |
|000053d0| 73 64 65 73 63 7d 20 69 | 73 20 61 20 62 75 69 6c |sdesc} i|s a buil|
|000053e0| 74 2d 69 6e 20 70 72 6f | 70 65 72 74 79 20 74 68 |t-in pro|perty th|
|000053f0| 61 74 20 74 68 65 0d 0a | 70 61 72 73 65 72 20 75 |at the..|parser u|
|00005400| 73 65 73 20 74 6f 0d 0a | 64 69 73 70 6c 61 79 20 |ses to..|display |
|00005410| 74 68 65 20 73 68 6f 72 | 74 20 64 65 73 63 72 69 |the shor|t descri|
|00005420| 70 74 69 6f 6e 20 6f 66 | 20 63 65 72 74 61 69 6e |ption of| certain|
|00005430| 20 6f 62 6a 65 63 74 73 | 2c 20 62 75 74 20 69 74 | objects|, but it|
|00005440| 2c 20 75 6e 6c 69 6b 65 | 20 76 6f 63 61 62 75 6c |, unlike| vocabul|
|00005450| 61 72 79 0d 0a 70 72 6f | 70 65 72 74 69 65 73 2c |ary..pro|perties,|
|00005460| 20 62 65 68 61 76 65 73 | 20 6c 69 6b 65 20 61 20 | behaves| like a |
|00005470| 6e 6f 72 6d 61 6c 20 70 | 72 6f 70 65 72 74 79 2e |normal p|roperty.|
|00005480| 0d 0a 0d 0a 56 6f 63 61 | 62 75 6c 61 72 79 20 77 |....Voca|bulary w|
|00005490| 6f 72 64 73 20 61 72 65 | 20 6e 6f 72 6d 61 6c 6c |ords are| normall|
|000054a0| 79 20 6d 61 64 65 20 75 | 70 20 73 6f 6c 65 6c 79 |y made u|p solely|
|000054b0| 20 6f 66 20 6c 65 74 74 | 65 72 73 2e 20 20 4e 75 | of lett|ers. Nu|
|000054c0| 6d 62 65 72 73 20 61 72 | 65 20 61 6c 73 6f 0d 0a |mbers ar|e also..|
|000054d0| 61 6c 6c 6f 77 65 64 2c | 20 73 6f 20 6c 6f 6e 67 |allowed,| so long|
|000054e0| 20 61 73 20 74 68 65 20 | 77 6f 72 64 20 73 74 61 | as the |word sta|
|000054f0| 72 74 73 20 77 69 74 68 | 20 61 74 20 6c 65 61 73 |rts with| at leas|
|00005500| 74 20 6f 6e 65 20 6c 65 | 74 74 65 72 20 6f 72 20 |t one le|tter or |
|00005510| 69 73 20 6d 61 64 65 20 | 75 70 0d 0a 65 6e 74 69 |is made |up..enti|
|00005520| 72 65 6c 79 20 6f 66 20 | 6e 75 6d 62 65 72 73 2e |rely of |numbers.|
|00005530| 20 20 28 4e 6f 74 65 20 | 74 68 61 74 20 6f 6e 6c | (Note |that onl|
|00005540| 79 20 61 64 6a 65 63 74 | 69 76 65 73 20 63 61 6e |y adject|ives can|
|00005550| 20 62 65 20 6d 61 64 65 | 20 75 70 20 65 6e 74 69 | be made| up enti|
|00005560| 72 65 6c 79 0d 0a 6f 66 | 20 6e 75 6d 62 65 72 73 |rely..of| numbers|
|00005570| 2e 29 20 20 48 65 6e 63 | 65 2c 20 60 61 31 32 33 |.) Henc|e, `a123|
|00005580| 27 20 69 73 20 76 61 6c | 69 64 20 66 6f 72 20 61 |' is val|id for a|
|00005590| 6e 79 20 70 61 72 74 20 | 6f 66 20 73 70 65 65 63 |ny part |of speec|
|000055a0| 68 2c 20 61 6e 64 20 60 | 31 32 33 27 0d 0a 69 73 |h, and `|123'..is|
|000055b0| 20 76 61 6c 69 64 20 61 | 73 20 61 6e 20 61 64 6a | valid a|s an adj|
|000055c0| 65 63 74 69 76 65 2e 20 | 20 49 6e 20 61 64 64 69 |ective. | In addi|
|000055d0| 74 69 6f 6e 2c 20 68 79 | 70 68 65 6e 73 20 28 60 |tion, hy|phens (`|
|000055e0| 7b 5c 74 74 20 2d 7d 27 | 29 20 61 6e 64 20 73 69 |{\tt -}'|) and si|
|000055f0| 6e 67 6c 65 20 71 75 6f | 74 65 73 0d 0a 61 72 65 |ngle quo|tes..are|
|00005600| 20 61 6c 6c 6f 77 65 64 | 20 77 69 74 68 69 6e 20 | allowed| within |
|00005610| 77 6f 72 64 73 2c 20 61 | 73 20 6c 6f 6e 67 20 61 |words, a|s long a|
|00005620| 73 20 74 68 65 20 66 69 | 72 73 74 20 63 68 61 72 |s the fi|rst char|
|00005630| 61 63 74 65 72 20 6f 66 | 20 74 68 65 20 77 6f 72 |acter of| the wor|
|00005640| 64 20 69 73 0d 0a 61 20 | 6c 65 74 74 65 72 2e 20 |d is..a |letter. |
|00005650| 20 46 69 6e 61 6c 6c 79 | 2c 20 61 20 77 6f 72 64 | Finally|, a word|
|00005660| 20 63 61 6e 20 68 61 76 | 65 20 61 20 70 65 72 69 | can hav|e a peri|
|00005670| 6f 64 20 28 60 7b 5c 74 | 74 20 2e 7d 27 29 20 61 |od (`{\t|t .}') a|
|00005680| 73 20 69 74 73 20 7b 5c | 69 74 20 6c 61 73 74 7d |s its {\|it last}|
|00005690| 0d 0a 63 68 61 72 61 63 | 74 65 72 3b 20 74 68 69 |..charac|ter; thi|
|000056a0| 73 20 61 6c 6c 6f 77 73 | 20 77 6f 72 64 73 20 73 |s allows| words s|
|000056b0| 75 63 68 20 61 73 20 60 | 60 4d 72 2e 22 20 61 6e |uch as `|`Mr." an|
|000056c0| 64 20 6d 69 64 64 6c 65 | 20 69 6e 69 74 69 61 6c |d middle| initial|
|000056d0| 73 20 69 6e 20 6e 61 6d | 65 73 0d 0a 74 6f 20 62 |s in nam|es..to b|
|000056e0| 65 20 75 73 65 64 20 61 | 73 20 76 6f 63 61 62 75 |e used a|s vocabu|
|000056f0| 6c 61 72 79 20 77 6f 72 | 64 73 2e 0d 0a 0d 0a 49 |lary wor|ds.....I|
|00005700| 6e 20 61 64 64 69 74 69 | 6f 6e 20 74 6f 20 7b 5c |n additi|on to {\|
|00005710| 74 74 20 73 64 65 73 63 | 7d 2c 20 6e 6f 75 6e 73 |tt sdesc|}, nouns|
|00005720| 20 73 68 6f 75 6c 64 20 | 64 65 66 69 6e 65 20 74 | should |define t|
|00005730| 68 65 20 70 72 6f 70 65 | 72 74 69 65 73 0d 0a 7b |he prope|rties..{|
|00005740| 5c 74 74 20 5e 7b 74 68 | 65 64 65 73 63 7d 7d 20 |\tt ^{th|edesc}} |
|00005750| 61 6e 64 20 7b 5c 74 74 | 20 5e 7b 61 64 65 73 63 |and {\tt| ^{adesc|
|00005760| 7d 7d 2c 20 77 68 69 63 | 68 20 64 69 73 70 6c 61 |}}, whic|h displa|
|00005770| 79 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |y the na|me of th|
|00005780| 65 0d 0a 6f 62 6a 65 63 | 74 20 70 72 65 63 65 64 |e..objec|t preced|
|00005790| 65 64 20 62 79 20 69 74 | 73 20 64 65 66 69 6e 69 |ed by it|s defini|
|000057a0| 74 65 20 61 72 74 69 63 | 6c 65 20 61 6e 64 20 69 |te artic|le and i|
|000057b0| 6e 64 65 66 69 6e 69 74 | 65 20 61 72 74 69 63 6c |ndefinit|e articl|
|000057c0| 65 2c 20 72 65 73 70 65 | 63 74 69 76 65 6c 79 2e |e, respe|ctively.|
|000057d0| 0d 0a 49 6e 20 6d 6f 73 | 74 20 63 61 73 65 73 2c |..In mos|t cases,|
|000057e0| 20 7b 5c 74 74 20 74 68 | 65 64 65 73 63 7d 20 69 | {\tt th|edesc} i|
|000057f0| 73 20 73 69 6d 70 6c 79 | 20 74 68 65 20 77 6f 72 |s simply| the wor|
|00005800| 64 20 60 60 74 68 65 22 | 20 66 6f 6c 6c 6f 77 65 |d ``the"| followe|
|00005810| 64 20 62 79 20 74 68 65 | 0d 0a 6f 62 6a 65 63 74 |d by the|..object|
|00005820| 27 73 20 7b 5c 74 74 20 | 73 64 65 73 63 7d 3b 20 |'s {\tt |sdesc}; |
|00005830| 6c 69 6b 65 77 69 73 65 | 2c 20 7b 5c 74 74 20 61 |likewise|, {\tt a|
|00005840| 64 65 73 63 7d 20 69 73 | 20 60 60 61 27 27 20 66 |desc} is| ``a'' f|
|00005850| 6f 6c 6c 6f 77 65 64 20 | 62 79 20 74 68 65 0d 0a |ollowed |by the..|
|00005860| 7b 5c 74 74 20 73 64 65 | 73 63 7d 2e 0d 0a 0d 0a |{\tt sde|sc}.....|
|00005870| 7b 5c 65 78 61 6d 70 6c | 65 0d 0a 20 20 20 20 5c |{\exampl|e.. \|
|00005880| 6f 62 6a 65 63 74 7b 54 | 68 69 6e 67 3a 20 6f 62 |object{T|hing: ob|
|00005890| 6a 65 63 74 7d 0d 0a 20 | 20 20 20 20 20 20 20 74 |ject}.. | t|
|000058a0| 68 65 64 65 73 63 20 3d | 20 0d 0a 20 20 20 20 20 |hedesc =| .. |
|000058b0| 20 20 20 5c 6c 62 0d 0a | 20 20 20 20 20 20 20 20 | \lb..| |
|000058c0| 20 20 20 22 74 68 65 20 | 22 3b 20 73 65 6c 66 2e | "the |"; self.|
|000058d0| 73 64 65 73 63 3b 0d 0a | 20 20 20 20 20 20 20 20 |sdesc;..| |
|000058e0| 5c 72 62 0d 0a 20 20 20 | 20 20 20 20 20 61 64 65 |\rb.. | ade|
|000058f0| 73 63 20 3d 20 0d 0a 20 | 20 20 20 20 20 20 20 5c |sc = .. | \|
|00005900| 6c 62 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 22 |lb.. | "|
|00005910| 61 20 22 3b 20 73 65 6c | 66 2e 73 64 65 73 63 3b |a "; sel|f.sdesc;|
|00005920| 0d 0a 20 20 20 20 20 20 | 20 20 5c 72 62 0d 0a 20 |.. | \rb.. |
|00005930| 20 20 20 5c 65 6e 64 6f | 62 6a 0d 0a 7d 0d 0a 0d | \endo|bj..}...|
|00005940| 0a 4e 6f 74 65 20 74 68 | 61 74 20 7b 5c 74 74 20 |.Note th|at {\tt |
|00005950| 61 64 65 73 63 7d 20 6e | 65 65 64 73 20 74 6f 20 |adesc} n|eeds to |
|00005960| 62 65 20 6f 76 65 72 72 | 69 64 64 65 6e 20 66 6f |be overr|idden fo|
|00005970| 72 20 63 65 72 74 61 69 | 6e 20 6f 62 6a 65 63 74 |r certai|n object|
|00005980| 2e 20 20 46 6f 72 0d 0a | 65 78 61 6d 70 6c 65 2c |. For..|example,|
|00005990| 20 6f 62 6a 65 63 74 73 | 20 77 68 6f 73 65 20 7b | objects| whose {|
|000059a0| 5c 74 74 20 73 64 65 73 | 63 7d 20 73 74 61 72 74 |\tt sdes|c} start|
|000059b0| 73 20 77 69 74 68 20 61 | 20 76 6f 77 65 6c 20 73 |s with a| vowel s|
|000059c0| 68 6f 75 6c 64 20 75 73 | 65 20 60 60 61 6e 27 27 |hould us|e ``an''|
|000059d0| 0d 0a 72 61 74 68 65 72 | 20 74 68 61 6e 20 60 60 |..rather| than ``|
|000059e0| 61 2e 27 27 20 20 4f 62 | 6a 65 63 74 73 20 77 68 |a.'' Ob|jects wh|
|000059f0| 69 63 68 20 72 65 70 72 | 65 73 65 6e 74 20 63 6f |ich repr|esent co|
|00005a00| 6c 6c 65 63 74 69 6f 6e | 73 20 6f 72 20 70 65 6f |llection|s or peo|
|00005a10| 70 6c 65 20 6f 72 0d 0a | 71 75 61 6e 74 69 74 69 |ple or..|quantiti|
|00005a20| 65 73 20 6f 66 20 73 6f | 6d 65 74 68 69 6e 67 20 |es of so|mething |
|00005a30| 6f 66 74 65 6e 20 6e 65 | 65 64 20 61 20 73 70 65 |often ne|ed a spe|
|00005a40| 63 69 61 6c 20 7b 5c 74 | 74 20 61 64 65 73 63 7d |cial {\t|t adesc}|
|00005a50| 20 74 6f 20 6d 61 6b 65 | 20 73 65 6e 73 65 3a 0d | to make| sense:.|
|00005a60| 0a 60 60 73 6f 6d 65 20 | 6d 69 6c 6b 27 27 20 69 |.``some |milk'' i|
|00005a70| 73 20 62 65 74 74 65 72 | 20 74 68 61 6e 20 60 60 |s better| than ``|
|00005a80| 61 20 6d 69 6c 6b 2c 27 | 27 20 61 6e 64 20 60 60 |a milk,'|' and ``|
|00005a90| 4c 6c 6f 79 64 27 27 20 | 73 68 6f 75 6c 64 20 62 |Lloyd'' |should b|
|00005aa0| 65 20 75 73 65 64 0d 0a | 72 61 74 68 65 72 20 74 |e used..|rather t|
|00005ab0| 68 61 6e 20 60 60 61 20 | 4c 6c 6f 79 64 2e 27 27 |han ``a |Lloyd.''|
|00005ac0| 0d 0a 0d 0a 5c 6d 69 6e | 6f 72 73 65 63 74 69 6f |....\min|orsectio|
|00005ad0| 6e 7b 45 78 65 63 75 74 | 69 6e 67 20 74 68 65 20 |n{Execut|ing the |
|00005ae0| 43 6f 6d 6d 61 6e 64 7d | 0d 0a 0d 0a 41 20 63 6f |Command}|....A co|
|00005af0| 6d 6d 61 6e 64 20 69 73 | 20 64 65 63 6f 6d 70 6f |mmand is| decompo|
|00005b00| 73 65 64 20 69 6e 74 6f | 20 69 74 73 20 5e 7b 61 |sed into| its ^{a|
|00005b10| 63 74 6f 72 7d 2c 20 5e | 7b 76 65 72 62 7d 2c 20 |ctor}, ^|{verb}, |
|00005b20| 5e 7b 64 69 72 65 63 74 | 20 6f 62 6a 65 63 74 7d |^{direct| object}|
|00005b30| 2c 0d 0a 5e 7b 69 6e 64 | 69 72 65 63 74 20 6f 62 |,..^{ind|irect ob|
|00005b40| 6a 65 63 74 7d 2c 20 61 | 6e 64 20 5e 7b 70 72 65 |ject}, a|nd ^{pre|
|00005b50| 70 6f 73 69 74 69 6f 6e | 7d 2e 20 48 65 6e 63 65 |position|}. Hence|
|00005b60| 2c 20 61 20 63 6f 6d 6d | 61 6e 64 20 73 75 63 68 |, a comm|and such|
|00005b70| 20 61 73 20 60 60 70 69 | 63 6b 20 75 70 20 74 68 | as ``pi|ck up th|
|00005b80| 65 0d 0a 72 65 64 20 62 | 6f 6f 6b 22 20 6d 69 67 |e..red b|ook" mig|
|00005b90| 68 74 20 64 65 63 6f 6d | 70 6f 73 65 20 61 73 20 |ht decom|pose as |
|00005ba0| 66 6f 6c 6c 6f 77 73 3a | 20 20 74 68 65 20 61 63 |follows:| the ac|
|00005bb0| 74 6f 72 20 69 73 20 7b | 5c 74 74 20 4d 65 7d 2c |tor is {|\tt Me},|
|00005bc0| 20 74 68 65 20 70 6c 61 | 79 65 72 0d 0a 61 63 74 | the pla|yer..act|
|00005bd0| 6f 72 3b 20 74 68 65 20 | 76 65 72 62 20 69 73 20 |or; the |verb is |
|00005be0| 7b 5c 74 74 20 74 61 6b | 65 56 65 72 62 7d 3b 20 |{\tt tak|eVerb}; |
|00005bf0| 74 68 65 20 64 69 72 65 | 63 74 20 6f 62 6a 65 63 |the dire|ct objec|
|00005c00| 74 20 69 73 20 7b 5c 74 | 74 20 52 65 64 42 6f 6f |t is {\t|t RedBoo|
|00005c10| 6b 7d 3b 0d 0a 74 68 65 | 20 69 6e 64 69 72 65 63 |k};..the| indirec|
|00005c20| 74 20 6f 62 6a 65 63 74 | 20 61 6e 64 20 70 72 65 |t object| and pre|
|00005c30| 70 6f 73 69 74 69 6f 6e | 20 61 72 65 20 7b 5c 74 |position| are {\t|
|00005c40| 74 20 6e 69 6c 7d 2e 0d | 0a 0d 0a 53 6f 2c 20 77 |t nil}..|...So, w|
|00005c50| 68 61 74 20 64 6f 65 73 | 20 74 68 65 20 67 61 6d |hat does| the gam|
|00005c60| 65 20 64 6f 20 77 69 74 | 68 20 74 68 69 73 20 69 |e do wit|h this i|
|00005c70| 6e 66 6f 72 6d 61 74 69 | 6f 6e 3f 0d 0a 4f 6e 63 |nformati|on?..Onc|
|00005c80| 65 20 61 67 61 69 6e 2c | 20 74 68 65 20 70 61 72 |e again,| the par|
|00005c90| 73 65 72 20 68 65 6c 70 | 73 20 74 68 65 20 67 61 |ser help|s the ga|
|00005ca0| 6d 65 20 64 65 73 69 67 | 6e 65 72 20 62 79 20 64 |me desig|ner by d|
|00005cb0| 6f 69 6e 67 20 6d 75 63 | 68 20 6f 66 20 74 68 65 |oing muc|h of the|
|00005cc0| 20 77 6f 72 6b 2e 20 20 | 0d 0a 46 69 72 73 74 2c | work. |..First,|
|00005cd0| 20 74 68 65 20 70 61 72 | 73 65 72 20 64 65 74 65 | the par|ser dete|
|00005ce0| 72 6d 69 6e 65 73 20 77 | 68 69 63 68 20 6f 62 6a |rmines w|hich obj|
|00005cf0| 65 63 74 73 20 61 72 65 | 20 69 6d 70 6c 69 63 61 |ects are| implica|
|00005d00| 74 65 64 20 69 6e 20 74 | 68 65 0d 0a 63 6f 6d 6d |ted in t|he..comm|
|00005d10| 61 6e 64 2c 20 74 68 65 | 6e 20 63 68 65 63 6b 73 |and, the|n checks|
|00005d20| 20 74 68 65 69 72 0d 0a | 61 76 61 69 6c 61 62 69 | their..|availabi|
|00005d30| 6c 69 74 79 20 77 69 74 | 68 20 74 68 65 20 7b 5c |lity wit|h the {\|
|00005d40| 74 74 20 5e 7b 76 61 6c | 69 64 49 6f 7d 7d 20 61 |tt ^{val|idIo}} a|
|00005d50| 6e 64 20 7b 5c 74 74 20 | 5e 7b 76 61 6c 69 64 44 |nd {\tt |^{validD|
|00005d60| 6f 7d 7d 20 6d 65 74 68 | 6f 64 73 20 6f 66 20 74 |o}} meth|ods of t|
|00005d70| 68 65 0d 0a 76 65 72 62 | 20 28 73 65 65 20 74 68 |he..verb| (see th|
|00005d80| 65 20 64 69 73 63 75 73 | 73 69 6f 6e 20 6f 66 20 |e discus|sion of |
|00005d90| 64 69 73 61 6d 62 69 67 | 75 61 74 69 6f 6e 2c 20 |disambig|uation, |
|00005da0| 62 65 6c 6f 77 29 2e 20 | 20 49 66 20 74 68 65 20 |below). | If the |
|00005db0| 6f 62 6a 65 63 74 73 0d | 0a 63 61 6e 20 62 65 20 |objects.|.can be |
|00005dc0| 73 75 63 63 65 73 73 66 | 75 6c 6c 79 20 69 64 65 |successf|ully ide|
|00005dd0| 6e 74 69 66 69 65 64 20 | 61 6e 64 20 61 72 65 20 |ntified |and are |
|00005de0| 76 61 6c 69 64 20 66 6f | 72 20 74 68 65 20 63 6f |valid fo|r the co|
|00005df0| 6d 6d 61 6e 64 2c 20 74 | 68 65 0d 0a 70 61 72 73 |mmand, t|he..pars|
|00005e00| 65 72 20 73 65 6e 64 73 | 20 61 20 73 65 74 20 6f |er sends| a set o|
|00005e10| 66 20 6d 65 73 73 61 67 | 65 73 20 74 6f 20 74 68 |f messag|es to th|
|00005e20| 65 73 65 20 6f 62 6a 65 | 63 74 73 20 74 6f 20 69 |ese obje|cts to i|
|00005e30| 6e 66 6f 72 6d 20 74 68 | 65 6d 20 74 68 61 74 20 |nform th|em that |
|00005e40| 74 68 65 79 20 68 61 76 | 65 0d 0a 62 65 65 6e 20 |they hav|e..been |
|00005e50| 75 73 65 64 20 69 6e 20 | 74 68 65 20 70 6c 61 79 |used in |the play|
|00005e60| 65 72 27 73 20 63 6f 6d | 6d 61 6e 64 2e 20 20 54 |er's com|mand. T|
|00005e70| 68 65 20 73 65 71 75 65 | 6e 63 65 20 6f 66 20 65 |he seque|nce of e|
|00005e80| 76 65 6e 74 73 20 69 73 | 20 73 68 6f 77 6e 20 62 |vents is| shown b|
|00005e90| 65 6c 6f 77 0d 0a 69 6e | 20 70 73 65 75 64 6f 2d |elow..in| pseudo-|
|00005ea0| 63 6f 64 65 2e 0d 0a 0d | 0a 5c 64 65 66 5c 63 6d |code....|.\def\cm|
|00005eb0| 64 61 63 74 7b 7b 5c 69 | 74 20 61 63 74 6f 72 7d |dact{{\i|t actor}|
|00005ec0| 7d 0d 0a 5c 64 65 66 5c | 63 6d 64 76 72 62 7b 7b |}..\def\|cmdvrb{{|
|00005ed0| 5c 69 74 20 76 65 72 62 | 7d 7d 0d 0a 5c 64 65 66 |\it verb|}}..\def|
|00005ee0| 5c 63 6d 64 64 6f 62 7b | 7b 5c 69 74 20 64 69 72 |\cmddob{|{\it dir|
|00005ef0| 65 63 74 20 6f 62 6a 65 | 63 74 7d 7d 0d 0a 5c 64 |ect obje|ct}}..\d|
|00005f00| 65 66 5c 63 6d 64 69 6f | 62 7b 7b 5c 69 74 20 69 |ef\cmdio|b{{\it i|
|00005f10| 6e 64 69 72 65 63 74 20 | 6f 62 6a 65 63 74 7d 7d |ndirect |object}}|
|00005f20| 0d 0a 5c 64 65 66 5c 63 | 6d 64 70 72 70 7b 7b 5c |..\def\c|mdprp{{\|
|00005f30| 69 74 20 70 72 65 70 6f | 73 69 74 69 6f 6e 7d 7d |it prepo|sition}}|
|00005f40| 0d 0a 0d 0a 7b 5c 65 78 | 61 6d 70 6c 65 20 5c 72 |....{\ex|ample \r|
|00005f50| 6d 0d 0a 20 20 20 20 5c | 63 6d 64 61 63 74 2e 72 |m.. \|cmdact.r|
|00005f60| 6f 6f 6d 43 68 65 63 6b | 28 5c 63 6d 64 76 72 62 |oomCheck|(\cmdvrb|
|00005f70| 20 29 0d 0a 20 20 20 20 | 5c 63 6d 64 61 63 74 2e | ).. |\cmdact.|
|00005f80| 61 63 74 6f 72 41 63 74 | 69 6f 6e 28 5c 63 6d 64 |actorAct|ion(\cmd|
|00005f90| 76 72 62 2c 20 5c 63 6d | 64 64 6f 62 2c 20 5c 63 |vrb, \cm|ddob, \c|
|00005fa0| 6d 64 70 72 70 2c 20 5c | 63 6d 64 69 6f 62 20 29 |mdprp, \|cmdiob )|
|00005fb0| 0d 0a 20 20 20 20 5c 63 | 6d 64 61 63 74 2e 6c 6f |.. \c|mdact.lo|
|00005fc0| 63 61 74 69 6f 6e 2e 72 | 6f 6f 6d 41 63 74 69 6f |cation.r|oomActio|
|00005fd0| 6e 28 5c 63 6d 64 61 63 | 74 2c 20 5c 63 6d 64 76 |n(\cmdac|t, \cmdv|
|00005fe0| 72 62 2c 20 5c 63 6d 64 | 64 6f 62 2c 20 5c 63 6d |rb, \cmd|dob, \cm|
|00005ff0| 64 70 72 70 2c 20 5c 63 | 6d 64 69 6f 62 20 29 0d |dprp, \c|mdiob ).|
|00006000| 0a 20 20 20 20 69 66 20 | 28 7b 5c 69 74 20 41 6e |. if |({\it An|
|00006010| 20 69 6e 64 69 72 65 63 | 74 20 6f 62 6a 65 63 74 | indirec|t object|
|00006020| 20 77 61 73 20 73 70 65 | 63 69 66 69 65 64 7d 29 | was spe|cified})|
|00006030| 0d 0a 20 20 20 20 5c 69 | 6e 76 69 73 6c 62 0d 0a |.. \i|nvislb..|
|00006040| 20 20 20 20 20 20 20 20 | 5c 63 6d 64 64 6f 62 2e | |\cmddob.|
|00006050| 76 65 72 44 6f 7b 5c 69 | 74 20 56 65 72 62 7d 28 |verDo{\i|t Verb}(|
|00006060| 5c 63 6d 64 61 63 74 2c | 20 5c 63 6d 64 69 6f 62 |\cmdact,| \cmdiob|
|00006070| 20 29 0d 0a 09 69 66 20 | 28 7b 5c 69 74 20 4e 6f | )...if |({\it No|
|00006080| 20 4f 75 74 70 75 74 20 | 72 65 73 75 6c 74 65 64 | Output |resulted|
|00006090| 20 66 72 6f 6d 20 76 65 | 72 44 6f 7b 5c 72 6d 20 | from ve|rDo{\rm |
|000060a0| 56 65 72 62 7d 7d 29 0d | 0a 09 5c 69 6e 76 69 73 |Verb}}).|..\invis|
|000060b0| 6c 62 0d 0a 09 20 20 20 | 20 5c 63 6d 64 69 6f 62 |lb... | \cmdiob|
|000060c0| 2e 76 65 72 49 6f 7b 5c | 69 74 20 56 65 72 62 7d |.verIo{\|it Verb}|
|000060d0| 28 5c 63 6d 64 61 63 74 | 20 29 0d 0a 09 20 20 20 |(\cmdact| )... |
|000060e0| 20 69 66 20 28 7b 5c 69 | 74 20 4e 6f 20 6f 75 74 | if ({\i|t No out|
|000060f0| 70 75 74 20 72 65 73 75 | 6c 74 65 64 20 66 72 6f |put resu|lted fro|
|00006100| 6d 20 76 65 72 49 6f 7b | 5c 72 6d 20 56 65 72 62 |m verIo{|\rm Verb|
|00006110| 7d 7d 29 0d 0a 09 20 20 | 20 20 5c 69 6e 76 69 73 |}})... | \invis|
|00006120| 6c 62 0d 0a 09 20 20 20 | 20 20 20 20 20 5c 63 6d |lb... | \cm|
|00006130| 64 69 6f 62 2e 69 6f 7b | 5c 69 74 20 56 65 72 62 |diob.io{|\it Verb|
|00006140| 7d 28 5c 63 6d 64 61 63 | 74 2c 20 5c 63 6d 64 64 |}(\cmdac|t, \cmdd|
|00006150| 6f 62 20 29 0d 0a 09 20 | 20 20 20 5c 69 6e 76 69 |ob )... | \invi|
|00006160| 73 72 62 0d 0a 09 5c 69 | 6e 76 69 73 72 62 0d 0a |srb...\i|nvisrb..|
|00006170| 20 20 20 20 5c 69 6e 76 | 69 73 72 62 0d 0a 20 20 | \inv|isrb.. |
|00006180| 20 20 65 6c 73 65 20 69 | 66 20 28 7b 5c 69 74 20 | else i|f ({\it |
|00006190| 41 20 64 69 72 65 63 74 | 20 6f 62 6a 65 63 74 20 |A direct| object |
|000061a0| 77 61 73 20 73 70 65 63 | 69 66 69 65 64 7d 29 0d |was spec|ified}).|
|000061b0| 0a 20 20 20 20 5c 69 6e | 76 69 73 6c 62 0d 0a 20 |. \in|vislb.. |
|000061c0| 20 20 20 20 20 20 20 5c | 63 6d 64 64 6f 62 2e 76 | \|cmddob.v|
|000061d0| 65 72 44 6f 7b 5c 69 74 | 20 56 65 72 62 7d 28 5c |erDo{\it| Verb}(\|
|000061e0| 63 6d 64 61 63 74 20 29 | 0d 0a 09 69 66 20 28 7b |cmdact )|...if ({|
|000061f0| 5c 69 74 20 4e 6f 20 6f | 75 74 70 75 74 20 72 65 |\it No o|utput re|
|00006200| 73 75 6c 74 65 64 20 66 | 72 6f 6d 20 76 65 72 44 |sulted f|rom verD|
|00006210| 6f 7b 5c 72 6d 20 56 65 | 72 62 7d 7d 29 0d 0a 09 |o{\rm Ve|rb}})...|
|00006220| 5c 69 6e 76 69 73 6c 62 | 0d 0a 09 20 20 20 20 5c |\invislb|... \|
|00006230| 63 6d 64 64 6f 62 2e 64 | 6f 7b 5c 69 74 20 56 65 |cmddob.d|o{\it Ve|
|00006240| 72 62 7d 28 5c 63 6d 64 | 61 63 74 20 29 0d 0a 09 |rb}(\cmd|act )...|
|00006250| 5c 69 6e 76 69 73 72 62 | 0d 0a 20 20 20 20 5c 69 |\invisrb|.. \i|
|00006260| 6e 76 69 73 72 62 0d 0a | 20 20 20 20 65 6c 73 65 |nvisrb..| else|
|00006270| 20 20 20 20 0d 0a 20 20 | 20 20 5c 69 6e 76 69 73 | .. | \invis|
|00006280| 6c 62 0d 0a 20 20 20 20 | 20 20 20 20 5c 63 6d 64 |lb.. | \cmd|
|00006290| 76 72 62 2e 61 63 74 69 | 6f 6e 28 5c 63 6d 64 61 |vrb.acti|on(\cmda|
|000062a0| 63 74 20 29 0d 0a 20 20 | 20 20 5c 69 6e 76 69 73 |ct ).. | \invis|
|000062b0| 72 62 0d 0a 20 20 20 20 | 7b 5c 69 74 20 52 75 6e |rb.. |{\it Run|
|000062c0| 20 65 61 63 68 20 64 61 | 65 6d 6f 6e 20 74 68 61 | each da|emon tha|
|000062d0| 74 20 69 73 20 63 75 72 | 72 65 6e 74 6c 79 20 61 |t is cur|rently a|
|000062e0| 63 74 69 76 65 7d 0d 0a | 20 20 20 20 7b 5c 69 74 |ctive}..| {\it|
|000062f0| 20 52 75 6e 20 61 6e 64 | 20 72 65 6d 6f 76 65 20 | Run and| remove |
|00006300| 65 61 63 68 20 66 75 73 | 65 20 74 68 61 74 20 68 |each fus|e that h|
|00006310| 61 73 20 62 75 72 6e 65 | 64 20 64 6f 77 6e 7d 0d |as burne|d down}.|
|00006320| 0a 5c 6d 65 64 73 6b 69 | 70 7d 0d 0a 0d 0a 0d 0a |.\medski|p}......|
|00006330| 54 68 69 73 20 6d 61 79 | 20 6c 6f 6f 6b 20 63 6f |This may| look co|
|00006340| 6d 70 6c 69 63 61 74 65 | 64 2c 20 62 75 74 20 79 |mplicate|d, but y|
|00006350| 6f 75 20 64 6f 6e 27 74 | 20 67 65 6e 65 72 61 6c |ou don't| general|
|00006360| 6c 79 20 68 61 76 65 20 | 74 6f 20 77 6f 72 72 79 |ly have |to worry|
|00006370| 0d 0a 61 62 6f 75 74 20 | 76 65 72 79 20 6d 75 63 |..about |very muc|
|00006380| 68 20 6f 66 20 69 74 2e | 20 20 4e 6f 72 6d 61 6c |h of it.| Normal|
|00006390| 6c 79 2c 20 79 6f 75 20 | 77 69 6c 6c 20 6f 6e 6c |ly, you |will onl|
|000063a0| 79 20 68 61 76 65 20 74 | 6f 20 63 75 73 74 6f 6d |y have t|o custom|
|000063b0| 69 7a 65 20 6f 6e 65 0d | 0a 6f 72 20 74 77 6f 20 |ize one.|.or two |
|000063c0| 6f 66 20 74 68 65 73 65 | 20 73 74 65 70 73 20 74 |of these| steps t|
|000063d0| 6f 20 6f 62 74 61 69 6e | 20 61 20 64 65 73 69 72 |o obtain| a desir|
|000063e0| 65 64 20 65 66 66 65 63 | 74 20 69 6e 20 79 6f 75 |ed effec|t in you|
|000063f0| 72 20 67 61 6d 65 2c 20 | 61 6e 64 20 6c 65 74 0d |r game, |and let.|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.